Exemplo n.º 1
0
 /**
  * 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');
 }
Exemplo n.º 3
0
 /**
  * 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');
 }
Exemplo n.º 4
0
 /**
  * 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');
 }
Exemplo n.º 5
0
 /**
  * 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');
 }
Exemplo n.º 6
0
 /**
  * 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');
 }
Exemplo n.º 7
0
 /**
  * Init
  */
 public function init()
 {
     parent::init();
     $this->createAndPushNavigationElement('Text list', 'unifik_system_backend_text');
 }