public function adminSave($aChosenOptions) { ArrayUtil::trimStringsInArray($aChosenOptions); $sValue = $aChosenOptions['external']; if (!$aChosenOptions['external']) { $sValue = $aChosenOptions['internal']; //TODO: remove outdated references (and when changing page types) ReferencePeer::addReference($this->oPage, PageQuery::create()->findPk($sValue)); } $this->oPage->updatePageProperty('redirect-location', $sValue); }
public function getSaveData($mData) { ReferencePeer::removeReferences($this->oLanguageObject); if (isset($mData['document_id'])) { foreach ($mData['document_id'] as $iDocumentId) { if ($iDocumentId) { ReferencePeer::addReference($this->oLanguageObject, array($iDocumentId, 'Document')); } } } return $this->dataFromPost($mData); }
public function widgetSave($mData) { $this->oLanguageObject->setData(serialize($mData)); $bResult = $this->oLanguageObject->save(); if ($bResult) { if (isset($mData['link_categories'])) { ReferencePeer::removeReferences($this->oLanguageObject); foreach ($mData['link_categories'] as $iCategoryId) { ReferencePeer::addReference($this->oLanguageObject, array($iCategoryId, 'LinkCategory')); } } } return $bResult; }
public function getSaveData($mData) { if ($this->oLanguageObject instanceof LanguageObject) { ReferencePeer::removeReferences($this->oLanguageObject); if (isset($mData['document_categories'])) { foreach ($mData['document_categories'] as $iCategoryId) { ReferencePeer::addReference($this->oLanguageObject, array($iCategoryId, 'DocumentCategory')); } } } return parent::getSaveData($mData); }
private function addTrackReference($iToId, $sToClass) { if ($this->mTrackReferences === null) { return; } ReferencePeer::addReference($this->mTrackReferences, array($iToId, $sToClass)); }