class EntityDelete in Services 9.0.x
Same name in this branch
- 9.0.x src/Plugin/Deriver/EntityDelete.php \Drupal\services\Plugin\Deriver\EntityDelete
- 9.0.x src/Plugin/ServiceDefinition/EntityDelete.php \Drupal\services\Plugin\ServiceDefinition\EntityDelete
Same name and namespace in other branches
- 8.4 src/Plugin/Deriver/EntityDelete.php \Drupal\services\Plugin\Deriver\EntityDelete
Class \Drupal\services\Plugin\Deriver\EntityDelete.
Hierarchy
- class \Drupal\services\Plugin\Deriver\EntityDelete extends \Drupal\ctools\Plugin\Deriver\EntityDeriverBase
Expanded class hierarchy of EntityDelete
File
- src/
Plugin/ Deriver/ EntityDelete.php, line 11
Namespace
Drupal\services\Plugin\DeriverView source
class EntityDelete extends EntityDeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
foreach ($this->entityTypeManager
->getDefinitions() as $entity_type_id => $entity_type) {
$this->derivatives[$entity_type_id] = $base_plugin_definition;
$this->derivatives[$entity_type_id]['title'] = $this
->t('@label: Delete', [
'@label' => $entity_type
->getLabel(),
]);
$this->derivatives[$entity_type_id]['description'] = $this
->t('Deletes a @entity_type_id object.', [
'@entity_type_id' => $entity_type_id,
]);
$this->derivatives[$entity_type_id]['category'] = $this
->t('@label', [
'@label' => $entity_type
->getLabel(),
]);
$this->derivatives[$entity_type_id]['path'] = "{$entity_type_id}/{{$entity_type_id}}";
$this->derivatives[$entity_type_id]['context'] = [
"{$entity_type_id}" => new ContextDefinition("entity:{$entity_type_id}", $this
->t('@label', [
'@label' => $entity_type
->getLabel(),
])),
];
}
return $this->derivatives;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityDelete:: |
public | function |