/**
* Render a layout with the same include paths & options
*
* @param string $layoutId The identifier for the sublayout to be searched in a subfolder with the name of the current layout
* @param mixed $displayData Data to be rendered
*
* @return string The necessary HTML to display the layout
*
* @since 3.2
*/
public function sublayout($layoutId, $displayData)
{
// Sublayouts are searched in a subfolder with the name of the current layout
if (!empty($this->layoutId)) {
$layoutId = $this->layoutId . '.' . $layoutId;
}
$sublayout = new static($layoutId, $this->basePath, $this->options);
$sublayout->includePaths = $this->includePaths;
return $sublayout->render($displayData);
}