class Ng2BlockDeriver in Decoupled Blocks 8
Derives block plugin definitions for Angular 2 components.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\pdb\Plugin\Derivative\PdbBlockDeriver implements ContainerDeriverInterface
- class \Drupal\pdb_ng2\Plugin\Derivative\Ng2BlockDeriver
- class \Drupal\pdb\Plugin\Derivative\PdbBlockDeriver implements ContainerDeriverInterface
Expanded class hierarchy of Ng2BlockDeriver
File
- modules/
pdb_ng2/ src/ Plugin/ Derivative/ Ng2BlockDeriver.php, line 10
Namespace
Drupal\pdb_ng2\Plugin\DerivativeView source
class Ng2BlockDeriver 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'] == 'ng2';
});
}
}
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:: |
|
Ng2BlockDeriver:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides PdbBlockDeriver:: |
|
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. |