Repository URL to install this package:
|
Version:
2.0.2 ▾
|
<?php
namespace Drupal\custom_forms\Form;
use Drupal\Core\Entity\ContentEntityDeleteForm;
use Drupal\Core\Url;
class CustomFormHandlerDeleteForm extends ContentEntityDeleteForm {
/**
* {@inheritdoc}
*/
protected function getRedirectUrl() {
/** @var \Drupal\custom_forms\Entity\CustomFormSubmissionHandlerInterface $entity */
$entity = $this->getEntity();
return Url::fromRoute('entity.custom_form_submission_handler.collection', ['custom_form' => $entity->getCustomForm()->id()]);
}
/**
* @inheritDoc
*/
public function getCancelUrl() {
/** @var \Drupal\custom_forms\Entity\CustomFormSubmissionHandlerInterface $entity */
$entity = $this->getEntity();
return Url::fromRoute('entity.custom_form_submission_handler.collection', ['custom_form' => $entity->getCustomForm()->id()]);
}
/**
* @inheritDoc
*/
public function getQuestion() {
/** @var \Drupal\custom_forms\Entity\CustomFormSubmissionHandlerInterface $entity */
$entity = $this->getEntity();
return $this->t('Are you sure you want to delete the handler %handler from %form?', [
'%handler' => $entity->label(),
'%form' => $entity->getCustomForm()->label(),
]);
}
}