Ejemplo n.º 1
0
 /**
  * load()
  * @param integer $intElementId
  * @param string $strType
  * @param string $strElementId
  * @param integet $intVersion
  * @author Thomas Schedler <*****@*****.**>
  * @version 1.0
  */
 public function load($intElementId, $strType, $strElementId = null, $intVersion = null)
 {
     try {
         $this->getModelPages();
         $intParentId = $this->objElement->Setup()->getParentId();
         $intParentTypeId = $this->objElement->Setup()->getParentTypeId();
         $objPageCollectionData = $this->objModelPages->loadPageCollection($strElementId, $intVersion, $intParentId, $intParentTypeId);
         if (count($objPageCollectionData) > 0) {
             $this->objElement->objPageCollection = $objPageCollectionData;
             $strValue = '';
             foreach ($objPageCollectionData as $objPageInternalLink) {
                 $strValue .= '[' . $objPageInternalLink->pageId . ']';
             }
             $this->objElement->setValue($strValue);
         }
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
     }
 }