Optimierung Darstellungen, kleine Bugs,
SS-Sudan twig im Content
This commit is contained in:
parent
e741dddfc1
commit
54fc46ace4
29 changed files with 377 additions and 18095 deletions
|
|
@ -3,21 +3,20 @@
|
|||
namespace AppBundle\Entity;
|
||||
|
||||
/**
|
||||
* CMSContentRepository
|
||||
* TravelGuideRepository
|
||||
*
|
||||
* This class was generated by the Doctrine ORM. Add your own custom
|
||||
* repository methods below.
|
||||
*/
|
||||
class CMSContentRepository extends \Doctrine\ORM\EntityRepository
|
||||
class TravelGuideRepository extends \Doctrine\ORM\EntityRepository
|
||||
{
|
||||
|
||||
public function findBySlug($slug)
|
||||
public function findByID($id)
|
||||
{
|
||||
$qb = $this->getEntityManager()->createQueryBuilder();
|
||||
$qb->select('c');
|
||||
$qb->from('AppBundle:CMSContent', 'c');
|
||||
$qb->where('c.slug = :slug');
|
||||
$qb->setParameter('slug', $slug);
|
||||
$qb->select('tg');
|
||||
$qb->from('AppBundle:TravelGuides', 'tg');
|
||||
$qb->where('tg.id = :id');
|
||||
$qb->setParameter('id', $id);
|
||||
$qb->setMaxResults(1);
|
||||
return $qb->getQuery()->getOneOrNullResult();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue