function ComponentPluginManager::isValidDefinition

Same name in this branch
  1. 11.x core/modules/sdc/src/ComponentPluginManager.php \Drupal\sdc\ComponentPluginManager::isValidDefinition()
Same name and namespace in other branches
  1. 10 core/modules/sdc/src/ComponentPluginManager.php \Drupal\sdc\ComponentPluginManager::isValidDefinition()

Validates the metadata info.

Parameters

array $definition: The component definition.

Return value

bool TRUE if it's valid.

Throws

\Drupal\Core\Render\Component\Exception\InvalidComponentException

1 call to ComponentPluginManager::isValidDefinition()
ComponentPluginManager::alterDefinitions in core/lib/Drupal/Core/Theme/ComponentPluginManager.php
Invokes the hook to alter the definitions if the alter hook is set.

File

core/lib/Drupal/Core/Theme/ComponentPluginManager.php, line 336

Class

ComponentPluginManager
Defines a plugin manager to deal with components.

Namespace

Drupal\Core\Theme

Code

private function isValidDefinition(array $definition) : bool {
    return $this->componentValidator
        ->validateDefinition($definition, $this->shouldEnforceSchemas($definition));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.