public function hasComponent($componentName)
    {
        $componentManager = ComponentManager::instance();
        $componentName = $componentManager->resolve($componentName);

        foreach ($this->settings['components'] as $sectionName => $values) {

            $result = $sectionName;

            if ($sectionName == $componentName) {
                return $result;
            }

            $parts = explode(' ', $sectionName);
            if (count($parts) > 1) {
                $sectionName = trim($parts[0]);

                if ($sectionName == $componentName) {
                    return $result;
                }
            }

            $sectionName = $componentManager->resolve($sectionName);
            if ($sectionName == $componentName) {
                return $result;
            }

        }

        return false;
    }
public function hasComponent($componentName)
    {
        $componentManager = ComponentManager::instance();
        $componentName = $componentManager->resolve($componentName);

        foreach ($this->settings['components'] as $sectionName => $values) {

            $result = $sectionName;

            if ($sectionName == $componentName) {
                return $result;
            }

            $parts = explode(' ', $sectionName);
            if (count($parts) > 1) {
                $sectionName = trim($parts[0]);

                if ($sectionName == $componentName) {
                    return $result;
                }
            }

            $sectionName = $componentManager->resolve($sectionName);
            if ($sectionName == $componentName) {
                return $result;
            }

        }

        return false;
    }
public function hasComponent ( $ componentName ) { $ componentManager = ComponentManager :: instance ( ) ; $ componentName = $ componentManager -> resolve ( $ componentName ) ; foreach ( $ this -> settings [ 'components' ] as $ sectionName => $ values ) { $ result = $ sectionName ; if ( $ sectionName == $ componentName ) { return $ result ; } $ parts = explode ( ' ' , $ sectionName ) ; if ( count ( $ parts ) > 1 ) { $ sectionName = trim ( $ parts [ 0 ] ) ; if ( $ sectionName == $ componentName ) { return $ result ; } } $ sectionName = $ componentManager -> resolve ( $ sectionName ) ; if ( $ sectionName == $ componentName ) { return $ result ; } } return false ; }
Checks if the object has a component with the specified name.
@param string $componentName Specifies the component name.
@return mixed Return false or the full component name used on the page (it could include the alias).
Checks if the object has a component with the specified name .