/** * @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; } }
/** * 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(); }
/** * @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); }