public function ApiDocDeleteForm::submitForm in Apigee API Catalog 8
Delete the entity and log the event. logger() replaces the watchdog.
Overrides ContentEntityForm::submitForm
File
- src/
Entity/ Form/ ApiDocDeleteForm.php, line 102
Class
- ApiDocDeleteForm
- Provides a form for deleting API Doc entities.
Namespace
Drupal\apigee_api_catalog\Entity\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$entity = $this
->getEntity();
$entity
->delete();
$this->logger
->notice('@type: deleted %title.', [
'@type' => $this->entity
->bundle(),
'%title' => $this->entity
->label(),
]);
$form_state
->setRedirect('entity.apidoc.collection');
}