/** * @param bool $disableControls */ public function display($disableControls = false) { $layout = $this->getAreaLayoutObject(); $a = $layout->getAreaObject(); $as = new SubArea($this->getAreaLayoutColumnDisplayID(), $a->getAreaHandle(), $a->getAreaID()); $as->setAreaDisplayName(t('Column %s', $this->getAreaLayoutColumnIndex() + 1)); if ($disableControls) { $as->disableControls(); } $c = $a->getAreaCollectionObject(); $as->load($c); if (!$this->getAreaID()) { $this->setAreaID($as->getAreaID()); } $as->setSubAreaBlockObject($this->arLayout->getBlockObject()); $as->display($c); }
/** * @return SubArea|null */ public function getSubAreaObject() { $layout = $this->getAreaLayoutObject(); $a = $layout->getAreaObject(); if (is_object($a)) { $as = new SubArea($this->getAreaLayoutColumnDisplayID(), $a->getAreaHandle(), $a->getAreaID()); $as->setAreaGridMaximumColumns($this->getSubAreaMaximumColumns()); $as->setAreaDisplayName(t('Column %s', $this->getAreaLayoutColumnIndex() + 1)); $c = $a->getAreaCollectionObject(); $as->load($c); if (!$this->getAreaID()) { $this->setAreaID($as->getAreaID()); } $as->setSubAreaBlockObject($this->arLayout->getBlockObject()); return $as; } else { return null; } }