示例#1
0
 /**
  * @param \ride\application\orm\entry\TextCtaEntry $entry 
  * @return null
  */
 public function setEntry(AliasTextCtaEntry $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;
     }
 }
示例#2
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();
 }
示例#3
0
 /**
  * @param \ride\application\orm\entry\TextCtaEntry $entry 
  * @return null
  */
 public function removeFromCallToActions(AliasTextCtaEntry $entry)
 {
     $this->getCallToActions();
     $status = false;
     foreach ($this->callToActions as $callToActionsIndex => $callToActionsValue) {
         if ($callToActionsValue === $entry || $callToActionsValue->getId() === $entry->getId()) {
             unset($this->callToActions[$callToActionsIndex]);
             $status = true;
             break;
         }
     }
     if ($status && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
     return $status;
 }
 /**
  * @param \ride\application\orm\entry\TextCtaEntry $entry 
  * @return null
  */
 public function setEntry(TextCtaEntry $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);
 }