Exemplo n.º 1
0
 /**
  * @param  Entities\BaseEntity $e
  * @param  int                 $menuSection
  * @return Entities\BaseEntity
  */
 protected function doActivate(Entities\BaseEntity $e, $menuSection)
 {
     $e->isActive = true;
     $this->persistAndFlush($this->em, $e);
     $this->menuCache->deleteSectionIfTagNotPresent($menuSection, $e->tag);
     return $e;
 }
Exemplo n.º 2
0
 public function render()
 {
     $template = $template = $this->getTemplate();
     $template->setFile(__DIR__ . '/templates/MenuControl.latte');
     $template->menuItems = $this->menuCache->getAll();
     $template->render();
 }
Exemplo n.º 3
0
 public function __construct(EntityDao $dao, ITranslator $translator, EntityManager $em, MenuCache $menuCache)
 {
     parent::__construct($dao, $em, $menuCache->setArticleRepository($this));
     $this->translator = $translator;
     $this->htmlPurifier = (new HtmlPurifierFactory())->createHtmlPurifier();
 }
Exemplo n.º 4
0
 /**
  * @param string           $vimeoOembedEndpoint
  * @param EntityDao        $dao
  * @param ITranslator      $translator
  * @param EntityManager    $em
  * @param MenuCache        $menuCache
  */
 public function __construct($vimeoOembedEndpoint, EntityDao $dao, ITranslator $translator, EntityManager $em, MenuCache $menuCache)
 {
     parent::__construct($dao, $em, $menuCache->setVideoRepository($this));
     $this->vimeoOembedEndpoint = $vimeoOembedEndpoint;
     $this->translator = $translator;
 }
Exemplo n.º 5
0
 /**
  * @param string           $wwwDir
  * @param string           $uploadDir
  * @param EntityDao        $dao
  * @param EntityDao        $fileDao
  * @param EntityManager    $em
  * @param MenuCache        $menuCache
  */
 public function __construct($wwwDir, $uploadDir, EntityDao $dao, EntityDao $fileDao, EntityManager $em, MenuCache $menuCache)
 {
     parent::__construct($dao, $em, $menuCache->setImageRepository($this));
     $this->uploadDir = $wwwDir . $uploadDir;
     $this->fileDao = $fileDao;
 }