You are here

public function EdgeEntityEventDeriverBase::getDerivativeDefinitions in Apigee Edge 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

modules/apigee_edge_actions/src/Plugin/RulesEvent/EdgeEntityEventDeriverBase.php, line 105

Class

EdgeEntityEventDeriverBase
Rules event deriver for Apigee Edge entity types.

Namespace

Drupal\apigee_edge_actions\Plugin\RulesEvent

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  foreach ($this
    ->getEntityTypes() as $entity_type) {
    $this->derivatives[$entity_type
      ->id()] = [
      'label' => $this
        ->getLabel($entity_type),
      'category' => $entity_type
        ->getLabel(),
      'entity_type_id' => $entity_type
        ->id(),
      'context_definitions' => $this
        ->getContext($entity_type),
    ] + $base_plugin_definition;
  }
  return $this->derivatives;
}