/Drupal 8

trait EntityDeleteFormTrait

Provides a trait for an entity deletion form.

This trait relies on the StringTranslationTrait and the logger method added by FormBase.


Related topics

Entity API
Describes how to define and manipulate content and configuration entities.


core/lib/Drupal/Core/Entity/EntityDeleteFormTrait.php, line 17




Name Modifiers Type Description
ConfigDependencyDeleteFormTrait::addDependencyListsToForm protected function Adds form elements to list affected configuration entities.
ConfigDependencyDeleteFormTrait::t abstract protected function Translates a string to the current language or to a given language. Overrides StringTranslationTrait::t
EntityDeleteFormTrait::getCancelUrl public function Returns the route to go to if the user cancels the action.
EntityDeleteFormTrait::getConfirmText public function Returns a caption for the button that confirms the action. Overrides ContentEntityConfirmFormBase::getConfirmText
EntityDeleteFormTrait::getDeletionMessage protected function Gets the message to display to the user after deleting the entity.
EntityDeleteFormTrait::getEntity abstract public function Gets the entity of this form. Overrides EntityForm::getEntity
EntityDeleteFormTrait::getQuestion public function Returns the question to ask the user.
EntityDeleteFormTrait::getRedirectUrl protected function Returns the URL where the user should be redirected after deletion.
EntityDeleteFormTrait::logDeletionMessage protected function Logs a message about the deleted entity.
EntityDeleteFormTrait::logger abstract protected function Gets the logger for a specific channel. Overrides FormBase::logger
EntityDeleteFormTrait::submitForm public function This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state… Overrides EntityForm::submitForm

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.