Exemplo n.º 1
0
 /**
  * @param \ride\application\orm\entry\AuthorEntry $author 
  * @return null
  */
 public function setAuthor(AliasAuthorEntry $author = NULL)
 {
     $isClean = false;
     if (!$this->author && !$author || $this->author && $author && $this->author->getId() === $author->getId()) {
         $isClean = true;
     }
     $this->author = $author;
     if (!$isClean && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
 }
Exemplo n.º 2
0
 /**
  * @param \ride\application\orm\entry\AuthorEntry $entry 
  * @return null
  */
 public function setEntry(AliasAuthorEntry $entry = NULL)
 {
     $isClean = false;
     if (!$this->entry && !$entry || $this->entry && $entry && $this->entry->getId() === $entry->getId()) {
         $isClean = true;
     }
     $this->entry = $entry;
     if (!$isClean && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
 }
Exemplo n.º 3
0
 /**
  * @param \ride\application\orm\entry\AuthorEntry $author 
  * @return null
  */
 public function setAuthor(AuthorEntry $author = NULL)
 {
     if (!isset($this->loadedFields['author'])) {
         $this->loadProperties();
     }
     $oldValue = null;
     if (array_key_exists('author', $this->loadedValues)) {
         $oldValue = $this->loadedValues['author'];
     }
     if (!$oldValue && !$author || $oldValue && $author && $oldValue->getId() === $author->getId()) {
         $this->author = $author;
         return;
     }
     return parent::setAuthor($author);
 }
Exemplo n.º 4
0
 /**
  * @param \ride\application\orm\entry\AuthorEntry $entry 
  * @return null
  */
 public function setEntry(AuthorEntry $entry = NULL)
 {
     if (!isset($this->loadedFields['entry'])) {
         $this->loadProperties();
     }
     $oldValue = null;
     if (array_key_exists('entry', $this->loadedValues)) {
         $oldValue = $this->loadedValues['entry'];
     }
     if (!$oldValue && !$entry || $oldValue && $entry && $oldValue->getId() === $entry->getId()) {
         $this->entry = $entry;
         return;
     }
     return parent::setEntry($entry);
 }
Exemplo n.º 5
0
 /**
  * Gets whether the entry is localized in the requested locale
  * @return boolean Flag to see if the entry is localized in the requested locale
  */
 public function isLocalized()
 {
     if (!isset($this->loadedFields['locale'])) {
         $this->loadProperties();
     }
     return parent::isLocalized();
 }