/** * @param \ride\application\orm\asset\entry\AssetEntry $pdf * @return null */ public function setPdf(AliasAssetEntry $pdf = NULL) { $isClean = false; if (!$this->pdf && !$pdf || $this->pdf && $pdf && $this->pdf->getId() === $pdf->getId()) { $isClean = true; } $this->pdf = $pdf; if (!$isClean && $this->entryState === self::STATE_CLEAN) { $this->entryState = self::STATE_DIRTY; } }
/** * @param \ride\application\orm\asset\entry\AssetEntry $entry * @return null */ public function setEntry(AliasAssetEntry $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\asset\entry\AssetEntry $asset * @return null */ public function setAsset(AliasAssetEntry $asset = NULL) { $isClean = false; if (!$this->asset && !$asset || $this->asset && $asset && $this->asset->getId() === $asset->getId()) { $isClean = true; } $this->asset = $asset; if (!$isClean && $this->entryState === self::STATE_CLEAN) { $this->entryState = self::STATE_DIRTY; } }
/** * @param \ride\application\orm\asset\entry\AssetEntry $asset * @return null */ public function setAsset(AssetEntry $asset = NULL) { if (!isset($this->loadedFields['asset'])) { $this->loadProperties(); } $oldValue = null; if (array_key_exists('asset', $this->loadedValues)) { $oldValue = $this->loadedValues['asset']; } if (!$oldValue && !$asset || $oldValue && $asset && $oldValue->getId() === $asset->getId()) { $this->asset = $asset; return; } return parent::setAsset($asset); }
/** * @param \ride\application\orm\asset\entry\AssetEntry $pdf * @return null */ public function setPdf(AssetEntry $pdf = NULL) { if (!isset($this->loadedFields['pdf'])) { $this->loadProperties(); } $oldValue = null; if (array_key_exists('pdf', $this->loadedValues)) { $oldValue = $this->loadedValues['pdf']; } if (!$oldValue && !$pdf || $oldValue && $pdf && $oldValue->getId() === $pdf->getId()) { $this->pdf = $pdf; return; } return parent::setPdf($pdf); }
/** * @param \ride\application\orm\asset\entry\AssetEntry $entry * @return null */ public function setEntry(AssetEntry $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); }
/** * @param \ride\application\orm\asset\entry\AssetEntry $entry * @return null */ public function removeFromAssets(AliasAssetEntry $entry) { $this->getAssets(); $status = false; foreach ($this->assets as $assetsIndex => $assetsValue) { if ($assetsValue === $entry || $assetsValue->getId() === $entry->getId()) { unset($this->assets[$assetsIndex]); $status = true; break; } } if ($status && $this->entryState === self::STATE_CLEAN) { $this->entryState = self::STATE_DIRTY; } return $status; }