english/libraries/joomla/application/component/view.php
/**
	* Sets an entire array of search paths for templates or resources.
	*
	* @param   string 		The type of path to set, typically 'template'.
	* @param   string|array	The new set of search paths.  If null or false, resets to the current directory only.
	*/
Sets an entire array of search paths for templates or resources.
@param   string               The type of path to set, typically 'template'.
@param   string|array The new set of search paths.  If null or false, resets to the current directory only.
Sets an entire array of search paths for templates or resources . @param string The type of path to set typically ' template ' . @param string|array The new set of search paths . If null or false resets to the current directory only .
protected function _setPath($type, $path)
	{
		jimport('joomla.application.helper');
		$component	= JApplicationHelper::getComponentName();
		$app		= JFactory::getApplication();
		$this->_path[$type] = array();
		$this->_addPath($type, $path);
		switch (strtolower($type))
		{
			case 'template':
				if (isset($app))
				{
					$component	= preg_replace('/[^A-Z0-9_\.-]/i', '', $component);
					$fallback	= JPATH_THEMES . '/' . $app->getTemplate() . '/html/' . $component . '/' . $this->getName();
					$this->_addPath('template', $fallback);
				}
				break;
		}
	}
protected function _setPath ( $ type , $ path ) { jimport ( 'joomla.application.helper' ) ; $ component = JApplicationHelper :: getComponentName ( ) ; $ app = JFactory :: getApplication ( ) ; $ this -> _path [ $ type ] = array ( ) ; $ this -> _addPath ( $ type , $ path ) ; switch ( strtolower ( $ type ) ) { case 'template' : if ( isset ( $ app ) ) { $ component = preg_replace ( '/[^A-Z0-9_\.-]/i' , '' , $ component ) ; $ fallback = JPATH_THEMES . '/' . $ app -> getTemplate ( ) . '/html/' . $ component . '/' . $ this -> getName ( ) ; $ this -> _addPath ( 'template' , $ fallback ) ; } break ; } }
Sets an entire array of search paths for templates or resources.
Sets an entire array of search paths for templates or resources .
// Clear out the prior search dirs // Actually add the user-specified directories // Always add the fallback directories as last resort // Set the alternative template search dir