public function EntityInlineForm::delete in Inline Entity Form 8
Delete permanently saved entities.
Parameters
int[] $ids: An array of entity IDs.
array $context: Available keys:
- parent_entity_type: The type of the parent entity.
- parent_entity: The parent entity.
Overrides InlineFormInterface::delete
File
- src/
Form/ EntityInlineForm.php, line 284
Class
- EntityInlineForm
- Generic entity inline form handler.
Namespace
Drupal\inline_entity_form\FormCode
public function delete($ids, $context) {
$storage_handler = $this->entityTypeManager
->getStorage($this->entityType
->id());
$entities = $storage_handler
->loadMultiple($ids);
$storage_handler
->delete($entities);
}