Back to RouterViewConfiguration class

Method setName

public \Joomla\CMS\Component\Router\RouterViewConfiguration
setName
(mixed $name)
Set the name of the view
Parameters
  • string $name Name of the view
Returns
  • \Joomla\CMS\Component\Router\RouterViewConfiguration This object for chaining
Since
  • 3.5

Method setName - Source code

/**
 * Set the name of the view
 *
 * @param   string  $name  Name of the view
 *
 * @return  RouterViewConfiguration  This object for chaining
 *
 * @since   3.5
 */
public function setName($name)
{
    $this->name = $name;
    array_pop($this->path);
    $this->path[] = $name;
    return $this;
}