Completed
Push — master ( 0eab77...b2f729 )
by Paul
05:35
created

BusinessEntityRepository::getByAvailableWidgets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
1
<?php
2
3
namespace Victoire\Bundle\BusinessEntityBundle\Entity;
4
5
use Doctrine\ORM\EntityRepository;
6
7
/**
8
 * The BusinessEntity Repository.
9
 */
10
class BusinessEntityRepository extends EntityRepository
11
{
12
    /**
13
     * @param array $widgetType
14
     */
15
    public function getByAvailableWidgets($widgetType)
16
    {
17
        return $this->createQueryBuilder('be')
18
            ->where('be.availableWidgets LIKE :widgetType')
19
            ->setParameter(':widgetType', '%'.$widgetType.'%')
20
            ->getQuery()
21
            ->execute();
22
    }
23
}
24