ShortcutDeleteForm.php

Same filename in other branches
  1. 9 core/modules/shortcut/src/Form/ShortcutDeleteForm.php
  2. 8.9.x core/modules/shortcut/src/Form/ShortcutDeleteForm.php
  3. 11.x core/modules/shortcut/src/Form/ShortcutDeleteForm.php

Namespace

Drupal\shortcut\Form

File

core/modules/shortcut/src/Form/ShortcutDeleteForm.php

View source
<?php

namespace Drupal\shortcut\Form;

use Drupal\Core\Entity\ContentEntityDeleteForm;
use Drupal\Core\Url;

/**
 * Builds the shortcut link deletion form.
 *
 * @internal
 */
class ShortcutDeleteForm extends ContentEntityDeleteForm {
    
    /**
     * {@inheritdoc}
     */
    public function getFormId() {
        return 'shortcut_confirm_delete';
    }
    
    /**
     * {@inheritdoc}
     */
    public function getCancelUrl() {
        return new Url('entity.shortcut_set.customize_form', [
            'shortcut_set' => $this->entity
                ->bundle(),
        ]);
    }
    
    /**
     * {@inheritdoc}
     */
    protected function getRedirectUrl() {
        return $this->getCancelUrl();
    }

}

Classes

Title Deprecated Summary
ShortcutDeleteForm Builds the shortcut link deletion form.

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