dynamic Sidebar form v3 (SidebarWidget)

Dynamic Nationality
4 Insurance
This commit is contained in:
Kevin Adametz 2019-02-14 13:52:51 +01:00
parent 8b2ec705c9
commit 88360eabb7
33 changed files with 604 additions and 275 deletions

View file

@ -0,0 +1,30 @@
<?php
namespace AppBundle\Entity;
/**
* SidebarWidgetRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class SidebarWidgetRepository extends \Doctrine\ORM\EntityRepository
{
public function findWidgetsBy($site)
{
$qb = $this->createQueryBuilder('sidebar_widget');
$qb->where('sidebar_widget.active = 1')
->addOrderBy('sidebar_widget.pos', 'ASC');
$results = $qb->getQuery()->getResult();
$ret = [];
foreach ($results as $result)
{
if($result->getIsShowAt($site)){
$ret[] = $result;
}
}
return $ret;
}
}