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

Breadcrumb

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

function ElementInfoManager::getInfo

Overrides ElementInfoManagerInterface::getInfo

1 call to ElementInfoManager::getInfo()
ElementInfoManager::getInfoProperty in core/lib/Drupal/Core/Render/ElementInfoManager.php
Retrieves a single property for the defined element type.

File

core/lib/Drupal/Core/Render/ElementInfoManager.php, line 63

Class

ElementInfoManager
Provides a plugin manager for element plugins.

Namespace

Drupal\Core\Render

Code

public function getInfo($type) {
    $theme_name = $this->themeManager
        ->getActiveTheme()
        ->getName();
    if (!isset($this->elementInfo[$theme_name])) {
        $this->elementInfo[$theme_name] = $this->buildInfo($theme_name);
    }
    $info = $this->elementInfo[$theme_name][$type] ?? [];
    $info['#defaults_loaded'] = TRUE;
    return $info;
}

API Navigation

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