/** * Initialize the object * * @param ContentModel $objElement * @param string $strColumn */ public function __construct($objElement, $strColumn = 'main') { if ($objElement instanceof Model) { $this->objModel = $objElement; } elseif ($objElement instanceof Model\Collection) { $this->objModel = $objElement->current(); } parent::__construct(); $this->arrData = $objElement->row(); $this->cssID = deserialize($objElement->cssID, true); if ($this->customTpl != '' && TL_MODE == 'FE') { $this->strTemplate = $this->customTpl; } $arrHeadline = deserialize($objElement->headline); $this->headline = is_array($arrHeadline) ? $arrHeadline['value'] : $arrHeadline; $this->hl = is_array($arrHeadline) ? $arrHeadline['unit'] : 'h1'; $this->strColumn = $strColumn; }
/** * @return array */ public function row() { return $this->model->row(); }