Esempio n. 1
0
 /**
  * @param \ride\web\mail\orm\entry\MailAddressEntry $mailAddress 
  * @return null
  */
 public function setMailAddress(AliasMailAddressEntry $mailAddress = NULL)
 {
     $isClean = false;
     if (!$this->mailAddress && !$mailAddress || $this->mailAddress && $mailAddress && $this->mailAddress->getId() === $mailAddress->getId()) {
         $isClean = true;
     }
     $this->mailAddress = $mailAddress;
     if (!$isClean && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
 }
Esempio n. 2
0
 /**
  * @param \ride\web\mail\orm\entry\MailAddressEntry $sender 
  * @return null
  */
 public function setSender(MailAddressEntry $sender = NULL)
 {
     if (!isset($this->loadedFields['sender'])) {
         $this->loadProperties();
     }
     $oldValue = null;
     if (array_key_exists('sender', $this->loadedValues)) {
         $oldValue = $this->loadedValues['sender'];
     }
     if (!$oldValue && !$sender || $oldValue && $sender && $oldValue->getId() === $sender->getId()) {
         $this->sender = $sender;
         return;
     }
     return parent::setSender($sender);
 }
 /**
  * @param \ride\web\mail\orm\entry\MailAddressEntry $mailAddress 
  * @return null
  */
 public function setMailAddress(MailAddressEntry $mailAddress = NULL)
 {
     if (!isset($this->loadedFields['mailAddress'])) {
         $this->loadProperties();
     }
     $oldValue = null;
     if (array_key_exists('mailAddress', $this->loadedValues)) {
         $oldValue = $this->loadedValues['mailAddress'];
     }
     if (!$oldValue && !$mailAddress || $oldValue && $mailAddress && $oldValue->getId() === $mailAddress->getId()) {
         $this->mailAddress = $mailAddress;
         return;
     }
     return parent::setMailAddress($mailAddress);
 }
Esempio n. 4
0
 /**
  * @param \ride\web\mail\orm\entry\MailAddressEntry $entry 
  * @return null
  */
 public function removeFromBcc(AliasMailAddressEntry $entry)
 {
     $this->getBcc();
     $status = false;
     foreach ($this->bcc as $bccIndex => $bccValue) {
         if ($bccValue === $entry || $bccValue->getId() === $entry->getId()) {
             unset($this->bcc[$bccIndex]);
             $status = true;
             break;
         }
     }
     if ($status && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
     return $status;
 }
Esempio n. 5
0
 /**
  * @return string
  */
 public function getDisplayName()
 {
     if (!isset($this->loadedFields['displayName'])) {
         $this->loadProperties();
     }
     return parent::getDisplayName();
 }