ComponentHelper
Component helper class
since |
1.5 |
---|---|
package |
Joomla CMS |
Methods
filterText
Applies the global text filters to arbitrary text as per settings for current user groups
filterText( text) :
since |
2.5 |
---|
Arguments
- text
string
The string to filter
Response
string
The filtered string
getComponent
Get the component information.
getComponent( option, strict = false) : \Joomla\CMS\Component\ComponentRecord
since |
1.5 |
---|
Arguments
- option
string
The component option.- strict
bool
If set and the component does not exist, the enabled attribute will be set to false.
Response
ComponentRecord
An object with the information for the component.
getComponentName
Returns the component name (eg. com_content) for the given object based on the class name.
getComponentName( object, alternativeName) :
If the object is not namespaced, then the alternative name is used.
since |
4.0.0 |
---|
Arguments
- object
object
The object controller or model- alternativeName
string
Mostly the value of getName() from the object
Response
string
The name
getComponents
Get installed components
getComponents() : \Joomla\CMS\Component\ComponentRecord||string|int
getParams
Gets the parameter object for the component
getParams( option, strict = false) : \Joomla\Registry\Registry
see | Registry |
---|---|
since |
1.5 |
Arguments
- option
string
The option for the component.- strict
bool
If set and the component does not exist, false will be returned
Response
Registry
A Registry object.
isEnabled
Checks if the component is enabled
isEnabled( option) :
since |
1.5 |
---|
Arguments
- option
string
The component option.
Response
bool
isInstalled
Checks if a component is installed
isInstalled( option) :
since |
3.4 |
---|
Arguments
- option
string
The component option.
Response
int
load
Load the installed components into the components property.
load() :
since |
3.2 |
---|
Response
bool
True on success
renderComponent
Render the component.
renderComponent( option, mixed||string|int params = []) :
since |
1.5 |
---|---|
throws |
Arguments
- option
string
The component option.- params
array<string|int, mixed>
The component parameters
Response
string