private static function addReferences($oDocument, &$aResult) { if ($oDocument->isInternallyManaged()) { $aResult['References'] = array(); foreach (ReferencePeer::getReferences($oDocument) as $oReference) { $aResult['References'][] = $oReference->toArray(); } } }
public function getPageData() { $oPage = PageQuery::create()->findPk($this->iPageId); $aResult = $oPage->toArray(BasePeer::TYPE_PHPNAME, false); // addition related page fields $aResult['PageLink'] = LinkUtil::absoluteLink(LinkUtil::link($oPage->getFullPathArray(), 'FrontendManager', array(), AdminManager::getContentLanguage()), null, 'auto'); $aResult['PageHref'] = LinkUtil::absoluteLink(LinkUtil::link($oPage->getFullPathArray(), 'FrontendManager', array(), AdminManager::getContentLanguage()), null, 'default', true); // page properties are displayed if added to template try { $mAvailableProperties = $this->getAvailablePageProperties($oPage); if (count($mAvailableProperties) > 0) { $aResult['page_properties'] = $mAvailableProperties; } } catch (Exception $e) { ErrorHandler::handleException($e, true); } // page references are displayed if exist $mReferences = AdminModule::getReferences(ReferencePeer::getReferences($oPage)); $aResult['CountReferences'] = count($mReferences); if ($mReferences !== null) { $aResult['page_references'] = $mReferences; } return $aResult; }
/** * @return A list of References (not Objects) which reference this Page */ public function getReferees() { return ReferencePeer::getReferences($this); }