/** * Set the page structure * * This will store the page structure in the registry and create a DOM unique ID for * each one. * * @param array $structure The page blocks to set * @return self */ public function setPageStructure(array $structure) { foreach ($structure as $_ref) { HtmlHelper::getNewId($_ref, true); } $this->registry->setEntry('page_structure', $structure); return $this; }
/** * Get a uniq DOM ID for an element * * @param string $reference A reference used to store the ID (and retrieve it - by default, a uniqid) * @param string|bool $base_id A string that will be used to construct the ID, if set to `true`, the reference will be used as `$base_id`) * @param bool $return Return/Echo flag (default is to echo result) * @return mixed The result of the `_echo` function (string or bool) * @see _echo() * @see Library\Helper\Html::getNewId() */ function _newid($reference = null, $base_id = null, $return = false) { return _echo(Helper\Html::getNewId($reference, $base_id), $return); }