/**
* Method to change the component where search for layouts
*
* @param string $option URL Option of the component. Example: com_content
*
* @return mixed Component option string | null for none
*
* @since 3.2
*/
public function setComponent($option)
{
$component = null;
switch ((string) $option) {
case 'none':
$component = null;
break;
case 'auto':
$component = ApplicationHelper::getComponentName();
break;
default:
$component = $option;
break;
}
// Extra checks
if (!$this->validComponent($component)) {
$component = null;
}
$this->options->set('component', $component);
// Refresh include paths
$this->clearIncludePaths();
}