public static \Joomla\CMS\Component\ComponentRecord
getComponent
(mixed $option, mixed $strict = false)
/**
* Get the component information.
*
* @param string $option The component option.
* @param boolean $strict If set and the component does not exist, the enabled attribute will be set to false.
*
* @return ComponentRecord An object with the information for the component.
*
* @since 1.5
*/
public static function getComponent($option, $strict = false)
{
$components = static::getComponents();
if (isset($components[$option])) {
return $components[$option];
}
$result = new ComponentRecord();
$result->enabled = $strict ? false : true;
$result->setParams(new Registry());
return $result;
}