Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
novicell/custom_forms / src / Form / CustomFormHandlerDeleteForm.php
Size: Mime:
<?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(),
    ]);
  }


}