/**
* Validate that the active component is valid
*
* @param string $option URL Option of the component. Example: com_content
*
* @return boolean
*
* @since 3.2
*/
protected function validComponent($option = null)
{
// By default we will validate the active component
$component = $option ?? $this->options->get('component', null);
// Valid option format
if (!empty($component) && substr_count($component, 'com_')) {
// Latest check: component exists and is enabled
return ComponentHelper::isEnabled($component);
}
return false;
}