<?php

namespace App\Repository;

use Doctrine\ORM\EntityRepository;

class WidgetRepository extends EntityRepository
{
    // getWidgetAccess
    public function getWidgetAccess($access)
    {
        $qb = $this->createQueryBuilder("widget");
        $qb ->where($qb->expr()->like('widget.access', $qb->expr()->literal("%$access%")));
        $widgets=$qb->getQuery()->getResult();

        return $widgets;
    }
}
