vendor/kunstmaan/article-bundle/Controller/AbstractArticleEntityAdminListController.php line 16

Open in your IDE?
  1. <?php
  2. namespace Kunstmaan\ArticleBundle\Controller;
  3. use Doctrine\ORM\EntityManager;
  4. use Kunstmaan\AdminBundle\Entity\BaseUser;
  5. use Kunstmaan\AdminBundle\Helper\Security\Acl\AclHelper;
  6. use Kunstmaan\AdminListBundle\AdminList\Configurator\AdminListConfiguratorInterface;
  7. use Kunstmaan\AdminListBundle\Controller\AdminListController;
  8. use Kunstmaan\ArticleBundle\AdminList\AbstractArticlePageAdminListConfigurator;
  9. use Symfony\Component\HttpFoundation\Request;
  10. /**
  11.  * Class AbstractArticleEntityAdminListController
  12.  */
  13. abstract class AbstractArticleEntityAdminListController extends AdminListController
  14. {
  15.     /**
  16.      * @var AdminListConfiguratorInterface
  17.      */
  18.     protected $configurator;
  19.     /**
  20.      * @var EntityManager
  21.      */
  22.     protected $em;
  23.     /**
  24.      * @var string
  25.      */
  26.     protected $locale;
  27.     /**
  28.      * @var BaseUser
  29.      */
  30.     protected $user;
  31.     /**
  32.      * @var AclHelper
  33.      */
  34.     protected $aclHelper;
  35.     /**
  36.      * NEXT_MAJOR: change method visibility from public to protected
  37.      *
  38.      * @return AdminListConfiguratorInterface
  39.      */
  40.     public function getAdminListConfigurator(Request $request)
  41.     {
  42.         $this->initAdminListConfigurator($request);
  43.         if (!isset($this->configurator)) {
  44.             $this->configurator $this->createAdminListConfigurator();
  45.         }
  46.         return $this->configurator;
  47.     }
  48.     /**
  49.      * NEXT_MAJOR: change method visibility from public to protected
  50.      *
  51.      * @return AbstractArticlePageAdminListConfigurator
  52.      */
  53.     abstract public function createAdminListConfigurator();
  54.     /**
  55.      * @param Request $request
  56.      */
  57.     protected function initAdminListConfigurator(Request $request)
  58.     {
  59.         $this->em $this->getEntityManager();
  60.         $this->locale $request->getLocale();
  61.         $this->user $this->container->get('security.token_storage')->getToken()->getUser();
  62.         $this->aclHelper $this->container->get('kunstmaan_admin.acl.helper');
  63.     }
  64. }