/** * Crop controller's constructor * * @param BBApplication $application */ public function __construct(BBApplication $application) { parent::__construct($application); $this->_em = $this->getEntityManager(); $this->request = $this->getRequest(); $this->revisionRepository = $this->_em->getRepository('BackBee\\ClassContent\\Revision'); $this->classContentRepository = $this->_em->getRepository('BackBee\\ClassContent\\AbstractClassContent'); $this->bbtoken = $application->getBBUserToken(); }
/** * Creates an instance of MediaController. * * @param ContainerInterface $app */ public function setContainer(ContainerInterface $container = null) { parent::setContainer($container); if ($this->getApplication()) { $mediaClasses = $this->getApplication()->getAutoloader()->glob('Media' . DIRECTORY_SEPARATOR . '*'); foreach ($mediaClasses as $mediaClass) { class_exists($mediaClass); } } }
/** * @see BackBee\Rest\Controller\ARestController::granted */ protected function granted($attributes, $object = null, $message = 'Access denied') { try { parent::granted($attributes, $object); } catch (AccessDeniedException $e) { throw new AccessDeniedException('Acces denied: no "' . (is_array($attributes) ? implode(', ', $attributes) : $attributes) . '" rights for bundle ' . get_class($object) . '.'); } return true; }