Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,612 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
/* For licensing terms, see /license.txt */ | ||
|
||
namespace Chamilo\CoreBundle\Entity; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* BranchTransactionStatus | ||
* | ||
* @ORM\Table(name="branch_transaction_status") | ||
* @ORM\Entity | ||
*/ | ||
class BranchTransactionStatus | ||
{ | ||
/** | ||
* @var integer | ||
* | ||
* @ORM\Column(name="id", type="integer", nullable=false, unique=false) | ||
* @ORM\Id | ||
* @ORM\GeneratedValue | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @ORM\Column(name="title", type="string", length=255, nullable=true, unique=false) | ||
*/ | ||
private $title; | ||
|
||
/** | ||
* Get id | ||
* | ||
* @return integer | ||
*/ | ||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
/** | ||
* Set title | ||
* | ||
* @param string $title | ||
* @return BranchTransactionStatus | ||
*/ | ||
public function setTitle($title) | ||
{ | ||
$this->title = $title; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Get title | ||
* | ||
* @return string | ||
*/ | ||
public function getTitle() | ||
{ | ||
return $this->title; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/Chamilo/CoreBundle/Entity/Repository/BranchSyncRepository.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/* For licensing terms, see /license.txt */ | ||
|
||
namespace Chamilo\CoreBundle\Entity\Repository; | ||
|
||
use Gedmo\Tree\Entity\Repository\NestedTreeRepository; | ||
|
||
/** | ||
* Class BranchSyncRepository | ||
* @package Chamilo\CoreBundle\Entity\Repository | ||
*/ | ||
class BranchSyncRepository extends NestedTreeRepository | ||
{ | ||
/** | ||
* @param string $keyword | ||
* @return mixed | ||
*/ | ||
public function searchByKeyword($keyword) | ||
{ | ||
$qb = $this->createQueryBuilder('a'); | ||
|
||
//Selecting user info | ||
$qb->select('DISTINCT b'); | ||
|
||
$qb->from('Chamilo\CoreBundle\Entity\BranchSync', 'b'); | ||
|
||
//Selecting courses for users | ||
//$qb->innerJoin('u.courses', 'c'); | ||
|
||
//@todo check app settings | ||
$qb->add('orderBy', 'b.branchName ASC'); | ||
$qb->where('b.branchName LIKE :keyword'); | ||
$qb->setParameter('keyword', "%$keyword%"); | ||
$q = $qb->getQuery(); | ||
return $q->execute(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
<?php | ||
/* For licensing terms, see /license.txt */ | ||
|
||
namespace Chamilo\CoreBundle\Entity; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* Room | ||
* | ||
* @ORM\Table(name="room") | ||
* @ORM\Entity | ||
*/ | ||
class Room | ||
{ | ||
/** | ||
* @var integer | ||
* | ||
* @ORM\Column(name="id", type="integer", nullable=false, unique=false) | ||
* @ORM\Id | ||
* @ORM\GeneratedValue | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @ORM\Column(name="title", type="string", length=255, nullable=true, unique=false) | ||
*/ | ||
private $title; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @ORM\Column(name="description", type="text", nullable=true) | ||
*/ | ||
private $description; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @ORM\Column(name="geolocation", type="string", length=255, nullable=true, unique=false) | ||
*/ | ||
private $geolocation; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @ORM\Column(name="ip", type="string", length=39, nullable=true, unique=false) | ||
*/ | ||
private $ip; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @ORM\Column(name="ip_mask", type="string", length=6, nullable=true, unique=false) | ||
*/ | ||
private $ipMask; | ||
|
||
/** | ||
* @var BranchSync | ||
* | ||
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\BranchSync") | ||
* @ORM\JoinColumn(name="branch_id", referencedColumnName="id") | ||
**/ | ||
private $branch; | ||
|
||
/** | ||
* Get id | ||
* | ||
* @return integer | ||
*/ | ||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
/** | ||
* Set title | ||
* | ||
* @param string $title | ||
* | ||
* @return $this | ||
*/ | ||
public function setTitle($title) | ||
{ | ||
$this->title = $title; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Get title | ||
* | ||
* @return string | ||
*/ | ||
public function getTitle() | ||
{ | ||
return $this->title; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getDescription() | ||
{ | ||
return $this->description; | ||
} | ||
|
||
/** | ||
* @param string $description | ||
* @return Room | ||
*/ | ||
public function setDescription($description) | ||
{ | ||
$this->description = $description; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getGeolocation() | ||
{ | ||
return $this->geolocation; | ||
} | ||
|
||
/** | ||
* @param string $geolocation | ||
* @return Room | ||
*/ | ||
public function setGeolocation($geolocation) | ||
{ | ||
$this->geolocation = $geolocation; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getIp() | ||
{ | ||
return $this->ip; | ||
} | ||
|
||
/** | ||
* @param string $ip | ||
* | ||
* @return Room | ||
*/ | ||
public function setIp($ip) | ||
{ | ||
$this->ip = $ip; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getIpMask() | ||
{ | ||
return $this->ipMask; | ||
} | ||
|
||
/** | ||
* @param string $ipMask | ||
* | ||
* @return Room | ||
*/ | ||
public function setIpMask($ipMask) | ||
{ | ||
$this->ipMask = $ipMask; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return BranchSync | ||
*/ | ||
public function getBranch() | ||
{ | ||
return $this->branch; | ||
} | ||
|
||
/** | ||
* @param BranchSync $branch | ||
* | ||
* @return $this | ||
*/ | ||
public function setBranch($branch) | ||
{ | ||
$this->branch = $branch; | ||
|
||
return $this; | ||
} | ||
} |
Oops, something went wrong.