public function getEntity($id = null) { $entity = parent::getEntity($id); if (!empty($id)) { $entity->loadAttachments(); } return $entity; }
public function getEntity($id) { if ($id == 'system') { throw new Forbidden(); } $entity = parent::getEntity($id); 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); if (!empty($id)) { if ($entity->get('fromEmailAddressName')) { $entity->set('from', $entity->get('fromEmailAddressName')); } $entity->loadLinkMultipleField('toEmailAddresses'); $entity->loadLinkMultipleField('ccEmailAddresses'); $entity->loadLinkMultipleField('bccEmailAddresses'); $names = $entity->get('toEmailAddressesNames'); if (!empty($names)) { $arr = array(); foreach ($names as $id => $address) { $arr[] = $address; } $entity->set('to', implode(';', $arr)); } $names = $entity->get('ccEmailAddressesNames'); if (!empty($names)) { $arr = array(); foreach ($names as $id => $address) { $arr[] = $address; } $entity->set('cc', implode(';', $arr)); } $names = $entity->get('bccEmailAddressesNames'); if (!empty($names)) { $arr = array(); foreach ($names as $id => $address) { $arr[] = $address; } $entity->set('bcc', implode(';', $arr)); } $this->loadNameHash($entity); } return $entity; }
public function getEntity($id = null) { $entity = parent::getEntity($id); $entity->clear('password'); return $entity; }
public function getEntity($id = null) { $entity = parent::getEntity($id); return $entity; }