function ComponentPluginManager::getAllComponents

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

Gets all components.

Return value

\Drupal\Core\Plugin\Component[] An array of Component objects.

File

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

Class

ComponentPluginManager
Defines a plugin manager to deal with components.

Namespace

Drupal\Core\Theme

Code

public function getAllComponents() : array {
    $plugin_ids = array_keys($this->getDefinitions());
    return array_values(array_filter(array_map([
        $this,
        'createInstance',
    ], $plugin_ids)));
}

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