abstract class EdgeEntityProductEventDeriverBase in Apigee Edge 8
Base deriver for Edge entity product events.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\apigee_edge_actions\Plugin\RulesEvent\EdgeEntityEventDeriverBase implements EdgeEntityEventDeriverInterface uses StringTranslationTrait
- class \Drupal\apigee_edge_actions\Plugin\RulesEvent\EdgeEntityProductEventDeriverBase
- class \Drupal\apigee_edge_actions\Plugin\RulesEvent\EdgeEntityEventDeriverBase implements EdgeEntityEventDeriverInterface uses StringTranslationTrait
Expanded class hierarchy of EdgeEntityProductEventDeriverBase
File
- modules/
apigee_edge_actions/ src/ Plugin/ RulesEvent/ EdgeEntityProductEventDeriverBase.php, line 30
Namespace
Drupal\apigee_edge_actions\Plugin\RulesEventView source
abstract class EdgeEntityProductEventDeriverBase extends EdgeEntityEventDeriverBase {
/**
* {@inheritdoc}
*/
public function getEntityTypes() : array {
// Filter out non app entity types.
// API Credential is not an entity type so we use App instead.
return array_filter(parent::getEntityTypes(), function (EdgeEntityTypeInterface $entity_type) {
return $entity_type
->entityClassImplements(AppInterface::class);
});
}
/**
* {@inheritdoc}
*/
public function getContext(EdgeEntityTypeInterface $entity_type) : array {
$context = parent::getContext($entity_type);
// The api_product entity type is not fieldable hence does not support typed
// data. We have to add the attributes individually here.
$context['api_product_name'] = [
'type' => 'string',
'label' => $this
->t('Name'),
];
$context['api_product_display_name'] = [
'type' => 'string',
'label' => $this
->t('Display name'),
];
return $context;
}
}
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:: |
|
EdgeEntityEventDeriverBase:: |
protected | property | The apigee app entity type manager service. | |
EdgeEntityEventDeriverBase:: |
public static | function |
Creates a new class instance. Overrides ContainerDeriverInterface:: |
|
EdgeEntityEventDeriverBase:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |
|
EdgeEntityEventDeriverBase:: |
public | function | AppEventDeriver constructor. | |
EdgeEntityEventDeriverInterface:: |
public | function | Returns the event's label. Example: 'After saving a new App'. | 7 |
EdgeEntityProductEventDeriverBase:: |
public | function |
Returns an array of event context. Overrides EdgeEntityEventDeriverBase:: |
|
EdgeEntityProductEventDeriverBase:: |
public | function |
Returns an array of entity types that are compatible to this event. Overrides EdgeEntityEventDeriverBase:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |