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