The function adds one or more view paths to the controller's stack, in LIFO order.
public function addViewPath($path)
{
return $this->addPath('view', $path);
}
The function adds to the search path for templates and resources.
protected function addPath($type, $path)
{
if (!isset($this->paths[$type]))
{
$this->paths[$type] = array();
}
// Loop through the path directories
foreach ((array) $path as $dir)
{
// No surrounding spaces allowed!
$dir = rtrim(\JPath::check($dir), '/') . '/';
// Add to the top of the search dirs
array_unshift($this->paths[$type], $dir);
}
return $this;
}