protected function FieldDeleteForm::getCancelPath

Returns the page to go to if the user cancels the action.

Return value

string|array This can be either:

  • A string containing a Drupal path.
  • An associative array with a 'path' key. Additional array values are passed as the $options parameter to l().

If the 'destination' query parameter is set in the URL when viewing a confirmation form, that value will be used instead of this path.

Overrides ConfirmFormBase::getCancelPath

File

drupal/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php, line 78
Contains \Drupal\field_ui\Form\FieldDeleteForm.

Class

FieldDeleteForm
Provides a form for removing a field instance from a bundle.

Namespace

Drupal\field_ui\Form

Code

protected function getCancelPath() {
  return $this->entityManager
    ->getAdminPath($this->instance->entity_type, $this->instance->bundle) . '/fields';
}