Back to RouterViewConfiguration class

Method removeLayout

public \Joomla\CMS\Component\Router\RouterViewConfiguration
removeLayout
(mixed $layout)
Remove a layout from this view
Parameters
  • string $layout Layouts that this view supports
Returns
  • \Joomla\CMS\Component\Router\RouterViewConfiguration This object for chaining
Since
  • 3.5

Method removeLayout - Source code

/**
 * Remove a layout from this view
 *
 * @param   string  $layout  Layouts that this view supports
 *
 * @return  RouterViewConfiguration  This object for chaining
 *
 * @since   3.5
 */
public function removeLayout($layout)
{
    $key = array_search($layout, $this->layouts);
    if ($key !== false) {
        unset($this->layouts[$key]);
    }
    return $this;
}