Example #1
0
 public function getEntity($id = null)
 {
     $entity = parent::getEntity($id);
     if (!empty($id)) {
         $entity->loadAttachments();
     }
     return $entity;
 }
Example #2
0
 public function getEntity($id)
 {
     if ($id == 'system') {
         throw new Forbidden();
     }
     $entity = parent::getEntity($id);
     return $entity;
 }
Example #3
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;
 }
Example #4
0
 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;
 }
Example #5
0
 public function getEntity($id = null)
 {
     $entity = parent::getEntity($id);
     $entity->clear('password');
     return $entity;
 }
Example #6
0
 public function getEntity($id = null)
 {
     $entity = parent::getEntity($id);
     return $entity;
 }