@param string $componentId

@return bool
@throws InvalidArgumentException
764068
public function offsetExists($componentId) : bool
    {
        list($columnName, $componentName) = explode('.', $componentId) + [1 => null];

        if (!array_key_exists($columnName, $this->data)) {
            return false;
        }

        $cellData = $this->getCellData($columnName);

        if (!$componentName) {
            return count($cellData) === 1;
        } else {
            return array_key_exists($componentName, $cellData);
        }
    }
697980
public List<Integer> getComponentTasks(String componentId) {
        List<Integer> ret = _componentToTasks.get(componentId);
        if (ret == null)
            return new ArrayList<>();
        else
            return new ArrayList<>(ret);
    }
462814
private function getIncidents($componentId = null, $unresolvedOnly = true)
    {
        $incidents = [];
        if ($this->isConfigured()) {
            $clientIdKey = $this->getClientIdKey();
            $cacheKey    = 'statuspageIncidents'.$this->keys[$clientIdKey];
            $cacheExpire = 10;
            if (!$incidents = $this->cache->get($cacheKey, $cacheExpire)) {
                $clientSKey = $this->getClientSecretKey();
                $state      = $this->getAuthLoginState();
                $url        = $this->getAuthenticationUrl();
                if ($unresolvedOnly) {
                    $url .= 'pages/'.$this->keys[$clientIdKey].'/incidents/unresolved.json';
                } else {
                    $url .= 'pages/'.$this->keys[$clientIdKey].'/incidents.json';
                }
                $url .= '?api_key='.$this->keys[$clientSKey]
                    .'&response_type=code'
                    .'&state='.$state;
                $incidents = $this->makeRequest($url, ['ignore_event_dispatch' => true]);
                if (is_array($incidents) && count($incidents)) {
                    $this->cache->set($cacheKey, $incidents, $cacheExpire);
                }
            }
        }
        // Narrow down to just the affected component if specified.
        if ($incidents && $componentId) {
            $affected = [];
            foreach ($incidents as $incident) {
                if (!empty($incident['incident_updates'])) {
                    foreach ($incident['incident_updates'] as $update) {
                        if (!empty($update['affected_components'])) {
                            foreach ($update['affected_components'] as $component) {
                                if (!empty($component['code']) && $component['code'] === $componentId) {
                                    $affected[] = $incident;
                                    continue;
                                }
                            }
                        }
                    }
                }
            }
            $incidents = $affected;
        }

        return $incidents;
    }
867031
private function grantAccess($perfilId, $componentId)
    {
        $permissao = [
            'perfil_id' => $perfilId,
            'componente_id' => $componentId
        ];

        $this->db->insert('singular_permissao', $permissao);
    }
984562
public static function doesComponentExist(string $addonComponentIdentifier): bool
    {
        $component = self::getComponentWithIdentifier($addonComponentIdentifier);
        return (!empty($component));
    }
462077
protected function addToComponentTreeSubset(array &$pointer, $componentId)
    {
        foreach ($this->graphComponents[$componentId]['path'] as $node) {
            if (empty($pointer[$node])) {
                $pointer[$node] = [];
            }
            $pointer =& $pointer[$node];
        }
        $pointer[] = $componentId;

        if ($this->graphComponents[$componentId]['master']) {
            $dependencies = array_column($this->graphComponents[$componentId]['master']['dependencies'], 'class');
            foreach ($this->graphComponents[$componentId]['master']['variants'] as $variant) {
                $dependencies = array_column($variant['dependencies'], 'class');
            }
        } else {
            $dependencies = array_column($this->graphComponents[$componentId]['dependencies'], 'class');
        }

        return array_unique($dependencies);
    }
802731
public function aggregate(string $componentId, callable $aggregateCallback) : ColumnMappingDefiner
    {
        $componentId = $this->structure->normalizeComponentId($componentId);
        list($column, $component) = explode('.', $componentId);

        return $this->computed(function (array $rows) use ($column, $component, $aggregateCallback) {
            return $aggregateCallback(array_column(array_column($rows, $column), $component));
        });
    }
133982
private function isSilent( common_configuration_Component $component)
    {
        $returnValue = (bool) false;

        
        $returnValue = in_array($component, $this->getSilentComponents());
        

        return (bool) $returnValue;
    }
301319
private function getManifestComponentModuleIndex($manifest, $componentId)
    {
        $manifest = is_array($manifest)
            ? $manifest
            : $this->getManifest($manifest);

        $modules = array_filter($manifest['modules'], function ($module) use ($componentId) {
            return ($module['id'] === $componentId);
        });

        return array_keys($modules)[0];
    }
801128
public function getComponentVersion( $componentName )
    {
        @$packageInfo = $this->registry->packageInfo( $componentName, null, 'components.ez.no' );
        $release = $packageInfo['version']['release'];
        return $release === null ? false : $release;
    }
1103823
public function is_component_active( $component ) {

		$active = false;

		if ( isset( $this->components[ $component ] ) && isset( $this->settings['components'][ $component ] ) && 0 !== $this->settings['components'][ $component ] ) {
			$active = true;
		}

		return $active;

	}
588864
public function requirementExistsForComponent( $component ) {
		foreach ( $this->requirements as $requirement ) {
			if ( $requirement->component() === $component ) {
				return true;
			}
		}

		return false;
	}
55320
public function average(string $componentId) : ColumnMappingDefiner
    {
        return $this->aggregate($componentId, function (array $values) {
            return (float)(array_sum($values) / count($values));
        });
    }
1112213
private function getComponentComposer($libraryRootPath, $componentId, $defaultComposerPath = null)
    {
        if (!$defaultComposerPath) {
            $defaultComposerPath = isset($this->defaultComponentComposer)
                ? $this->defaultComponentComposer
                : null;
        }

        $componentsDir = isset($this->components)
            ? $this->components
            : $libraryRootPath;

        $components = $this->getComponents($libraryRootPath, $componentsDir, $defaultComposerPath);

        $components = array_values(array_filter($components, function ($component) use ($componentId) {
            return ($component['id'] === $componentId);
        }));

        if (count($components) === 0) {
            throw new \InvalidArgumentException(sprintf(
                'Given component id %s is not a valid component.',
                $componentId
            ));
        }

        return $components[0];
    }
161157
private function _isAllowedComponentClass($userRow, $componentClass)
    {
        if ($this->_isAllowedComponentClassByRole($this->_getRole($userRow), $componentClass)) {
            return true;
        }
        foreach ($this->_getAdditionalRoles($userRow) as $role) {
            if ($this->_isAllowedComponentClassByRole($role, $componentClass)) {
                return true;
            }
        }
        return false;
    }
392832
public function removeComponent($id)
    {
        /** @var PartInterface $component */
        $component = $this->getComponents()->findByProperty('id', $id, true);
        if ($component) {
            $this->getComponents()->remove($component);
        }
        return $this;
    }
389653
public function handle(ComponentContext $componentContext)
    {
        $componentContext = $this->prepareActionRequest($componentContext);
        $actionRequest = $componentContext->getParameter(DispatchComponent::class, 'actionRequest');
        $this->setDefaultControllerAndActionNameIfNoneSpecified($actionRequest);
        $actionResponse = $this->prepareActionResponse($componentContext->getHttpResponse());
        $this->dispatcher->dispatch($actionRequest, $actionResponse);
        // TODO: This should change in next major when the action response is no longer a HTTP response for backward compatibility.
        $componentContext->replaceHttpResponse($actionResponse);
    }