Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ComponentPluginManager.php

function 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)));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal