Ejemplo n.º 1
0
 /**
  * Entity constructor.
  *
  * @param array $properties
  * @param array $options
  */
 public function __construct(array $properties = [], array $options = [])
 {
     $Theme = Theme::getInstance();
     if (isset($properties['alias'])) {
         $name = UnionPlugin::aliasToName($properties['alias']);
         $this->_xmlPath = $Theme->getPath() . $name . DS . $Theme->getFileName();
     }
     if ($this->_xmlPath) {
         $xml = Xml::build($this->_xmlPath);
         if ($xml instanceof \SimpleXMLElement) {
             $this->_xmlAttr = $Theme->setAttributes($xml);
         }
     }
     parent::__construct($properties, $options);
 }
Ejemplo n.º 2
0
 /**
  * Entity constructor.
  *
  * @param array $properties
  * @param array $options
  */
 public function __construct(array $properties = [], array $options = [])
 {
     $this->_converter = new LinkConverter();
     parent::__construct($properties, $options);
 }
Ejemplo n.º 3
0
 /**
  * Setup link meta data.
  *
  * @param ParamsEntity $link
  */
 protected function _setupMetaData(ParamsEntity $link)
 {
     $params = $link->params();
     //  Setup page title by params.
     if ($pageTitle = $params->get('meta_title')) {
         $this->_view->assign('page_title', $pageTitle);
     }
     //  Setup page keywords by params.
     if ($pageKeys = $params->get('meta_keys')) {
         $this->_view->assign('meta_keywords', $pageKeys);
     }
     //  Setup page description by params.
     if ($pageDesc = $params->get('meta_desc')) {
         $this->_view->assign('meta_description', $pageDesc);
     }
 }