interface ConfirmFormInterface

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Form/ConfirmFormInterface.php \Drupal\Core\Form\ConfirmFormInterface
  2. 8.9.x core/lib/Drupal/Core/Form/ConfirmFormInterface.php \Drupal\Core\Form\ConfirmFormInterface
  3. 10 core/lib/Drupal/Core/Form/ConfirmFormInterface.php \Drupal\Core\Form\ConfirmFormInterface

Defines the behavior a confirmation form.

Hierarchy

Expanded class hierarchy of ConfirmFormInterface

All classes that implement ConfirmFormInterface

2 files declare their use of ConfirmFormInterface
ContentEntityConfirmFormBase.php in core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php
EntityConfirmFormBase.php in core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php

File

core/lib/Drupal/Core/Form/ConfirmFormInterface.php, line 8

Namespace

Drupal\Core\Form
View source
interface ConfirmFormInterface extends FormInterface {
    
    /**
     * Returns the question to ask the user.
     *
     * @return \Drupal\Core\StringTranslation\TranslatableMarkup
     *   The form question. The page title will be set to this value.
     */
    public function getQuestion();
    
    /**
     * Returns the route to go to if the user cancels the action.
     *
     * @return \Drupal\Core\Url
     *   A URL object.
     */
    public function getCancelUrl();
    
    /**
     * Returns additional text to display as a description.
     *
     * @return \Drupal\Core\StringTranslation\TranslatableMarkup
     *   The form description.
     */
    public function getDescription();
    
    /**
     * Returns a caption for the button that confirms the action.
     *
     * @return \Drupal\Core\StringTranslation\TranslatableMarkup
     *   The form confirmation text.
     */
    public function getConfirmText();
    
    /**
     * Returns a caption for the link which cancels the action.
     *
     * @return \Drupal\Core\StringTranslation\TranslatableMarkup
     *   The form cancellation text.
     */
    public function getCancelText();
    
    /**
     * Returns the internal name used to refer to the confirmation item.
     *
     * @return string
     *   The internal form name.
     */
    public function getFormName();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ConfirmFormInterface::getCancelText public function Returns a caption for the link which cancels the action. 3
ConfirmFormInterface::getCancelUrl public function Returns the route to go to if the user cancels the action. 41
ConfirmFormInterface::getConfirmText public function Returns a caption for the button that confirms the action. 3
ConfirmFormInterface::getDescription public function Returns additional text to display as a description. 3
ConfirmFormInterface::getFormName public function Returns the internal name used to refer to the confirmation item. 3
ConfirmFormInterface::getQuestion public function Returns the question to ask the user. 42
FormInterface::buildForm public function Form constructor. 200
FormInterface::getFormId public function Returns a unique string identifying the form. 281
FormInterface::submitForm public function Form submission handler. 226
FormInterface::validateForm public function Form validation handler. 34

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.