class ReactBlockDeriver in Decoupled Blocks 8
Derives block plugin definitions for React components.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\pdb\Plugin\Derivative\PdbBlockDeriver implements ContainerDeriverInterface
- class \Drupal\pdb_react\Plugin\Derivative\ReactBlockDeriver
- class \Drupal\pdb\Plugin\Derivative\PdbBlockDeriver implements ContainerDeriverInterface
Expanded class hierarchy of ReactBlockDeriver
File
- modules/
pdb_react/ src/ Plugin/ Derivative/ ReactBlockDeriver.php, line 10
Namespace
Drupal\pdb_react\Plugin\DerivativeView source
class ReactBlockDeriver extends PdbBlockDeriver {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$definitions = parent::getDerivativeDefinitions($base_plugin_definition);
return array_filter($definitions, function (array $definition) {
return $definition['info']['presentation'] == 'react';
});
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
PdbBlockDeriver:: |
protected | property | The component discovery service. | |
PdbBlockDeriver:: |
public static | function |
Creates a new class instance. Overrides ContainerDeriverInterface:: |
|
PdbBlockDeriver:: |
protected | function | Creates the context definitions required by a block plugin. | |
PdbBlockDeriver:: |
public | function | PdbBlockDeriver constructor. | |
ReactBlockDeriver:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides PdbBlockDeriver:: |