src/Joomlatools/Console/Joomla/Application.php
public function hasExtension($element, $type = 'component')
    {
        $db = JFactory::getDbo();
        $sql = "SELECT `extension_id`, `state` FROM `#__extensions`"
            ." WHERE `element` = ".$db->quote($element)." AND `type` = ".$db->quote($type);

        $extension = $db->setQuery($sql)->loadObject();

        return ($extension && $extension->state != -1);
    }
public function hasExtension($element, $type = 'component')
    {
        $db = JFactory::getDbo();
        $sql = "SELECT `extension_id`, `state` FROM `#__extensions`"
            ." WHERE `element` = ".$db->quote($element)." AND `type` = ".$db->quote($type);

        $extension = $db->setQuery($sql)->loadObject();

        return ($extension && $extension->state != -1);
    }
public function hasExtension ( $ element , $ type = 'component' ) { $ db = JFactory :: getDbo ( ) ; $ sql = "SELECT `extension_id`, `state` FROM `#__extensions`" . " WHERE `element` = " . $ db -> quote ( $ element ) . " AND `type` = " . $ db -> quote ( $ type ) ; $ extension = $ db -> setQuery ( $ sql ) -> loadObject ( ) ; return ( $ extension && $ extension -> state != - 1 ) ; }
Checks if this Joomla installation has a certain element installed.

@param string $element   The name of the element
@param string $type      The type of extension

@return bool
Checks if this Joomla installation has a certain element installed .