Exemplo n.º 1
0
 /**
  * Initialize Node
  *
  * @param array $rec
  * @return void
  */
 function __construct($rec)
 {
     $this->recordId = $rec['Id'];
     $this->recordParentId = $rec['PId'];
     $this->objectName = $rec['title'];
     $this->module = $rec['module'];
     $this->objectDescription = $rec['description'];
     $this->url = $rec['link'];
     if (Expression::isExpression($this->url)) {
         $this->url = Expression::evaluateExpression($this->url, $this);
     } else {
         if (!empty($this->url)) {
             if (strpos($this->url, '/') === 0) {
                 $this->url = OPENBIZ_APP_INDEX_URL . $this->url;
             } else {
                 $this->url = OPENBIZ_APP_INDEX_URL . '/' . $this->url;
             }
         }
     }
     $this->url_Match = $rec['alias'];
     //$this->cssClass = $rec['Id'];
     $this->iconImage = $rec['icon'];
     $this->iconCSSClass = $rec['icon_css'];
     $this->access = $rec['access'];
     $this->translate();
     // translate for multi-language support
 }