Check if the given component is disabled.

@param UI\AbstractComponent $component
@return boolean
491868
private function is_disabled( $component )
    {
        return 
            $component instanceof DisableableComponentInterface &&
            (
                true === $component->disabled ||
                true === $component->readonly
            );
    }
749210
private function filter( $component )
    {
        if( $component instanceof FilterableComponentInterface )
        {
            $filter = $component->filter;

            if( is_callable( $filter ) ) 
            {
                $component->value = \call_user_func_array($filter, array($this->final_instance[$component->name]));
                $this->final_instance[$component->name] = $component->value;
            }
        }
    }
892913
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;
    }
1345087
public function postUpdateComponent(Component $component)
    {
        try {
            execute(new UpdateComponentCommand(
                $component,
                $component->name,
                $component->description,
                Binput::get('status'),
                $component->link,
                $component->order,
                $component->group_id,
                $component->enabled,
                $component->meta,
                false
            ));
        } catch (QueryException $e) {
            throw new BadRequestHttpException();
        }

        return $this->item($component);
    }
1127008
public function whereComponent($components, $property, $value, $strict = false)
    {
        return $this->filter(function ($object) use ($components, $property, $value, $strict) {

            $hasComponent = false;

            foreach ((array) $components as $componentName) {

                if (!$componentAlias = $object->hasComponent($componentName)) {
                    continue;
                }

                $componentSettings = array_get($object->settings, 'components', []);

                if (!array_key_exists($componentAlias, $componentSettings)) {
                    continue;
                }

                $settings = $componentSettings[$componentAlias];

                if (!array_key_exists($property, $settings)) {
                    continue;
                }

                if (
                    ($strict && $settings[$property] === $value) ||
                    (!$strict && $settings[$property] == $value)
                ) {
                    $hasComponent = true;
                }
            }

            return $hasComponent;
        });
    }
221365
public function addComponent(Component $component)
	{
		$component->setParentComponent($this);
		$component->setFormComponent($this->formComponent);
		
		$this->components[$component->getName()] = $component;
		
		// Set value if there is one
		$component->setRequestData(is_array($this->inputData) && array_key_exists($component->getName(), $this->inputData) ? $this->inputData[$component->getName()] : null);
	}
145318
private void disable(IDisable comp, boolean disabled) {
        if (comp != null) {
            comp.setDisabled(disabled);

            if (comp instanceof BaseUIComponent) {
                ((BaseUIComponent) comp).addStyle("opacity", disabled ? ".2" : "1");
            }
        }
    }
71740
public function cancel_plugin_installation($component) {
        global $CFG;

        if (!empty($CFG->disableupdateautodeploy)) {
            return false;
        }

        $plugin = $this->get_plugin_info($component);

        if ($this->can_cancel_plugin_installation($plugin)) {
            $this->remove_plugin_folder($plugin);
        }

        return false;
    }
39150
function (el) {
        return !isElement(el)
            || el.disabled
            || el.classList.contains('disabled')
            || Boolean(el.getAttribute('disabled'))
    }
77233
public function isComponentInstalled( $componentName )
    {
        $root = $this->xml->deps->packages->package;

        foreach ( $root as $package )
        {
            if ( (string) $package['name'] == $componentName )
            {
                return true;
            }
        }
        return false;
    }
1273978
public static boolean isSecure(final Component component)
	{
		if (AnnotationExtensions.isAnnotationPresentInSuperClassesOrInterfaces(component.getClass(),
			RequireHttps.class))
		{
			return true;
		}
		return false;
	}
862715
public static function hasBehavior($component, $behavior)
    {
        if ($behavior instanceof Behavior) {
            $behavior = (string)$behavior->className();
        } else {
            if (is_string($behavior)) {
                $behavior = (string)$behavior;
            }
        }

        if (!method_exists($component, 'getBehaviors')) {
            return false;
        }

        $hasBehaviors = $component->getBehaviors();

        foreach ($hasBehaviors as $hasBehavior) {
            if ($hasBehavior instanceof $behavior) {
                return true;
            }
        }

        return false;
    }
766494
public static boolean shouldRenderChildren(UIComponent component) {
        for (int i = 0; i < component.getChildren().size(); i++) {
            if (component.getChildren().get(i).isRendered()) {
                return true;
            }
        }

        return false;
    }
461129
public function has($component, $name)
    {
        $this->load();

        return (bool) mb_strlen($this->get($component, $name));
    }
687423
public static void disableAction(BaseComponent component, String eventName, boolean disable) {
        ActionListener listener = getListener(component, eventName);
        
        if (listener != null) {
            listener.setDisabled(disable);
        }
    }
1113324
public function onComponentConfigure($component)
    {
        $this->onComponentsList();
        Breadcrumbs::register('component-configure', function($breadcrumbs) use($component) {
            $breadcrumbs->parent('components');
            $breadcrumbs->push('Configuration: ' . $component->getFullName());
        });
        view()->share('breadcrumbs', Breadcrumbs::render('component-configure'));
    }
683255
public static function isEnabled($plugin)
    {
        $plugin_list = static::getPluginList();

        return (is_array($plugin_list) && in_array($plugin, $plugin_list)) ? true : false;
    }