/** * Init */ public function init() { parent::init(); $this->createAndPushNavigationElement('Sections', 'unifik_system_backend_section_root', array('appSlug' => $this->getApp()->getSlug())); $this->navigationRepository = $this->getEm()->getRepository('UnifikSystemBundle:Navigation'); $this->sectionRepository = $this->getEm()->getRepository('UnifikSystemBundle:Section'); $this->appRepository = $this->getEm()->getRepository('UnifikSystemBundle:App'); }
/** * Init */ public function init() { if (false === $this->get('security.context')->isGranted('ROLE_DEVELOPER')) { throw new AccessDeniedHttpException(); } parent::init(); $this->createAndPushNavigationElement('Applications', 'unifik_system_backend_application'); $this->appRepository = $this->getEm()->getRepository('UnifikSystemBundle:App'); }
/** * Init */ public function init() { parent::init(); // Access restricted to ROLE_BACKEND_ADMIN if (false === $this->get('security.context')->isGranted('ROLE_BACKEND_ADMIN')) { throw new AccessDeniedHttpException('You don\'t have the privileges to view this page.'); } $this->createAndPushNavigationElement('Languages', 'unifik_system_backend_locale'); }
/** * Init */ public function init() { parent::init(); // Check if the current User has the privileges if (!$this->get('security.context')->isGranted('ROLE_BACKEND_ADMIN')) { throw new AccessDeniedHttpException(); } $this->createAndPushNavigationElement('Users', 'unifik_system_backend_user'); $this->isDeveloper = $this->get('security.context')->isGranted('ROLE_DEVELOPER'); }
/** * Init */ public function init() { parent::init(); // Access restricted to ROLE_BACKEND_ADMIN if (false === $this->get('security.context')->isGranted('ROLE_BACKEND_ADMIN')) { throw new AccessDeniedHttpException('You don\'t have the privileges to view this page.'); } $this->sectionRepository = $this->getEm()->getRepository('UnifikSystemBundle:Section'); $this->navigationRepository = $this->getEm()->getRepository('UnifikSystemBundle:Navigation'); $this->createAndPushNavigationElement('Subsections list', 'unifik_system_backend_section'); }
/** * Init */ public function init() { parent::init(); // Check if the current User has the privileges if (!$this->get('security.context')->isGranted('ROLE_BACKEND_ADMIN')) { throw new AccessDeniedHttpException(); } $this->createAndPushNavigationElement('Roles', 'unifik_system_backend_role'); // Add/remove some behaviors if Admin $this->isAdmin = $this->get('security.context')->isGranted('ROLE_BACKEND_ADMIN'); $this->isDeveloper = $this->get('security.context')->isGranted('ROLE_DEVELOPER'); $this->rolesAdmin = array('ROLE_BACKEND_ADMIN', 'ROLE_DEVELOPER'); }
/** * Init */ public function init() { parent::init(); $this->createAndPushNavigationElement('Text list', 'unifik_system_backend_text'); }