function BlockManager::getType

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getType()
  2. 8.9.x core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getType()
  3. 10 core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getType()

A string identifying the plugin type.

This string should be unique and generally will correspond to the string used by the discovery, e.g. the annotation class or the YAML file name.

Return value

string A string identifying the plugin type.

Overrides FilteredPluginManagerTrait::getType

1 call to BlockManager::getType()
BlockManager::__construct in core/lib/Drupal/Core/Block/BlockManager.php
Constructs a new \Drupal\Core\Block\BlockManager object.

File

core/lib/Drupal/Core/Block/BlockManager.php, line 59

Class

BlockManager
Manages discovery and instantiation of block plugins.

Namespace

Drupal\Core\Block

Code

protected function getType() {
  return 'block';
}

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