You are here

public function FieldBlock::getDerivativeDefinitions in Field as Block 8

Gets the definition of all derivatives of a base plugin.

Parameters

array $base_plugin_definition: The definition array of the base plugin.

Return value

array An array of full derivative definitions keyed on derivative id.

Overrides DeriverBase::getDerivativeDefinitions

See also

getDerivativeDefinition()

File

src/Plugin/Derivative/FieldBlock.php, line 61
Contains \Drupal\fieldblock\Plugin\Derivative\FieldBlock.

Class

FieldBlock
Provides block plugin definitions for fieldblock blocks.

Namespace

Drupal\fieldblock\Plugin\Derivative

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  $blocks = $this
    ->fieldBlockGetBlockList();
  foreach ($blocks as $fieldblock_id => $description) {
    $this->derivatives[$fieldblock_id] = $base_plugin_definition;
    $this->derivatives[$fieldblock_id]['admin_label'] = $description;
  }
  return $this->derivatives;
}