Example #1
0
 /**
  * @param \ride\application\orm\model\TaxonomyVocabulary $vocabulary 
  * @return null
  */
 public function setVocabulary(AliasTaxonomyVocabulary $vocabulary = NULL)
 {
     $isClean = false;
     if (!$this->vocabulary && !$vocabulary || $this->vocabulary && $vocabulary && $this->vocabulary->getId() === $vocabulary->getId()) {
         $isClean = true;
     }
     $this->vocabulary = $vocabulary;
     if (!$isClean && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
 }
Example #2
0
 /**
  * @param \ride\application\orm\model\TaxonomyVocabulary $vocabulary 
  * @return null
  */
 public function setVocabulary(TaxonomyVocabulary $vocabulary = NULL)
 {
     if (!isset($this->loadedFields['vocabulary'])) {
         $this->loadProperties();
     }
     $oldValue = null;
     if (array_key_exists('vocabulary', $this->loadedValues)) {
         $oldValue = $this->loadedValues['vocabulary'];
     }
     if (!$oldValue && !$vocabulary || $oldValue && $vocabulary && $oldValue->getId() === $vocabulary->getId()) {
         $this->vocabulary = $vocabulary;
         return;
     }
     return parent::setVocabulary($vocabulary);
 }
 /**
  * @return string
  */
 public function getSlug()
 {
     if (!isset($this->loadedFields['slug'])) {
         $this->loadProperties();
     }
     return parent::getSlug();
 }