API15

API15:JComponentHelper/isEnabled

From Joomla! Documentation

Revision as of 21:52, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Checks if the component is enabled <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<now...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Checks if the component is enabled

[Edit Descripton]

Template:Description:JComponentHelper/isEnabled

Syntax

static isEnabled($option, $strict=false)
Parameter Name Default Value Description
$option $option The component option.
$strict false $string If set and a component does not exist, false will be returned

Returns

boolean

Defined in

libraries/joomla/application/component/helper.php

Importing

jimport( 'joomla.application.component.helper' );

Source Body

public static function isEnabled($option, $strict = false)
{
        $result = &self::getComponent($option, $strict);
        return ($result->enabled | JFactory::getApplication()->isAdmin());
}

[Edit See Also] Template:SeeAlso:JComponentHelper/isEnabled

Examples

<CodeExamplesForm />