Пример #1
0
 /**
  * @param \ride\application\orm\model\TaxonomyTerm $entry 
  * @return null
  */
 public function setEntry(AliasTaxonomyTerm $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;
     }
 }
 /**
  * @param \ride\application\orm\model\TaxonomyTerm $entry 
  * @return null
  */
 public function setEntry(TaxonomyTerm $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);
 }
Пример #3
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();
 }
Пример #4
0
 /**
  * @param \ride\application\orm\model\TaxonomyTerm $parent 
  * @return null
  */
 public function setParent(AliasTaxonomyTerm $parent = NULL)
 {
     $isClean = false;
     if (!$this->parent && !$parent || $this->parent && $parent && $this->parent->getId() === $parent->getId()) {
         $isClean = true;
     }
     $this->parent = $parent;
     if (!$isClean && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
 }