class ComponentHelper

Component helper class

Methods

static  ComponentRecord
getComponent( string $option, boolean $strict = false)

Get the component information.

static  boolean
isEnabled( string $option)

Checks if the component is enabled

static  integer
isInstalled( string $option)

Checks if a component is installed

static  Registry
getParams( string $option, boolean $strict = false)

Gets the parameter object for the component

static  string
filterText( string $text)

Applies the global text filters to arbitrary text as per settings for current user groups

static  string
renderComponent( string $option, array $params = array())

Render the component.

static  ComponentRecord[]
getComponents()

Get installed components

Details

static ComponentRecord getComponent( string $option, boolean $strict = false)

Get the component information.

Parameters

string $option The component option.
boolean $strict If set and the component does not exist, the enabled attribute will be set to false.

Return Value

ComponentRecord An object with the information for the component.

static boolean isEnabled( string $option)

Checks if the component is enabled

Parameters

string $option The component option.

Return Value

boolean

static integer isInstalled( string $option)

Checks if a component is installed

Parameters

string $option The component option.

Return Value

integer

static Registry getParams( string $option, boolean $strict = false)

Gets the parameter object for the component

Parameters

string $option The option for the component.
boolean $strict If set and the component does not exist, false will be returned

Return Value

Registry A Registry object.

See also

Registry

static string filterText( string $text)

Applies the global text filters to arbitrary text as per settings for current user groups

Parameters

string $text The string to filter

Return Value

string The filtered string

static string renderComponent( string $option, array $params = array())

Render the component.

Parameters

string $option The component option.
array $params The component parameters

Return Value

string

Exceptions

MissingComponentException

static ComponentRecord[] getComponents()

Get installed components

Return Value

ComponentRecord[] The components property