You are here

class Ng2BlockDeriver in Decoupled Blocks 8

Derives block plugin definitions for Angular 2 components.

Hierarchy

Expanded class hierarchy of Ng2BlockDeriver

File

modules/pdb_ng2/src/Plugin/Derivative/Ng2BlockDeriver.php, line 10

Namespace

Drupal\pdb_ng2\Plugin\Derivative
View 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

Namesort descending Modifiers Type Description Overrides
DeriverBase::$derivatives protected property List of derivative definitions. 1
DeriverBase::getDerivativeDefinition public function Gets the definition of a derivative plugin. Overrides DeriverInterface::getDerivativeDefinition
Ng2BlockDeriver::getDerivativeDefinitions public function Gets the definition of all derivatives of a base plugin. Overrides PdbBlockDeriver::getDerivativeDefinitions
PdbBlockDeriver::$componentDiscovery protected property The component discovery service.
PdbBlockDeriver::create public static function Creates a new class instance. Overrides ContainerDeriverInterface::create
PdbBlockDeriver::createContexts protected function Creates the context definitions required by a block plugin.
PdbBlockDeriver::__construct public function PdbBlockDeriver constructor.