You are here

public function ReactBlockDeriver::getDerivativeDefinitions in Decoupled Blocks 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 PdbBlockDeriver::getDerivativeDefinitions

See also

getDerivativeDefinition()

File

modules/pdb_react/src/Plugin/Derivative/ReactBlockDeriver.php, line 15

Class

ReactBlockDeriver
Derives block plugin definitions for React components.

Namespace

Drupal\pdb_react\Plugin\Derivative

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  $definitions = parent::getDerivativeDefinitions($base_plugin_definition);
  return array_filter($definitions, function (array $definition) {
    return $definition['info']['presentation'] == 'react';
  });
}