Exemple #1
0
 public function getEntity($id = null)
 {
     $entity = parent::getEntity($id);
     if (!empty($id)) {
         $entity->loadAttachments();
     }
     return $entity;
 }
Exemple #2
0
 public function getEntity($id = null)
 {
     if (isset($id) && $id == 'system') {
         throw new Forbidden();
     }
     $entity = parent::getEntity($id);
     if ($entity && $entity->get('isSuperAdmin') && !$this->getUser()->get('isSuperAdmin')) {
         throw new Forbidden();
     }
     return $entity;
 }
Exemple #3
0
 public function getEntity($id = null)
 {
     $entity = parent::getEntity($id);
     return $entity;
 }