public function getEntity($id = null) { $entity = parent::getEntity($id); if (!empty($id)) { $entity->loadAttachments(); } return $entity; }
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; }
public function getEntity($id = null) { $entity = parent::getEntity($id); return $entity; }