API15:JApplicationHelper/getComponentName
From Joomla! Documentation
Description
Return the name of the request component [main component]
<! removed transcluded page call, red link never existed >
Syntax
static getComponentName($default=NULL)
| Parameter Name | Default Value | Description |
|---|---|---|
| $default | NULL | $default The default option |
Returns
string Option
Defined in
libraries/joomla/application/helper.php
Importing
jimport( 'joomla.application.helper' );
Source Body
public static function getComponentName($default = NULL)
{
static $option;
if ($option) {
return $option;
}
$option = strtolower(JRequest::getCmd('option'));
if (empty($option)) {
$option = $default;
}
JRequest::setVar('option', $option);
return $option;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples