Ejemplo n.º 1
0
 /**
  * @param \ride\application\orm\entry\AuthorLocalizedEntry $authorLocalized 
  * @return null
  */
 public function setAuthorLocalized(AliasAuthorLocalizedEntry $authorLocalized = NULL)
 {
     $isClean = false;
     if (!$this->authorLocalized && !$authorLocalized || $this->authorLocalized && $authorLocalized && $this->authorLocalized->getId() === $authorLocalized->getId()) {
         $isClean = true;
     }
     $this->authorLocalized = $authorLocalized;
     if (!$isClean && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
 }
Ejemplo n.º 2
0
 /**
  * @param \ride\application\orm\entry\AuthorLocalizedEntry $authorLocalized 
  * @return null
  */
 public function setAuthorLocalized(AuthorLocalizedEntry $authorLocalized = NULL)
 {
     if (!isset($this->loadedFields['authorLocalized'])) {
         $this->loadProperties();
     }
     $oldValue = null;
     if (array_key_exists('authorLocalized', $this->loadedValues)) {
         $oldValue = $this->loadedValues['authorLocalized'];
     }
     if (!$oldValue && !$authorLocalized || $oldValue && $authorLocalized && $oldValue->getId() === $authorLocalized->getId()) {
         $this->authorLocalized = $authorLocalized;
         return;
     }
     return parent::setAuthorLocalized($authorLocalized);
 }
Ejemplo n.º 3
0
 /**
  * @return array
  */
 public function getPosts()
 {
     if (!isset($this->loadedFields['posts'])) {
         $this->loadRelation('posts');
     }
     return parent::getPosts();
 }