Completed
Push — 8.x-1.x ( 48b271...fbaab6 )
by Janez
02:46
created

EntityBrowserDeleteForm::getConfirmText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * @file
5
 * Contains Drupal\entity_browser\Form\EntityBrowserDeleteForm.
6
 */
7
8
namespace Drupal\entity_browser\Form;
9
10
use Drupal\Core\Entity\EntityDeleteForm;
11
use Drupal\Core\Url;
12
13
/**
14
 * Delete confirm form for entity browsers.
15
 */
16
class EntityBrowserDeleteForm extends EntityDeleteForm {
17
18
  /**
19
   * {@inheritdoc}
20
   */
21
  public function getQuestion() {
22
    return $this->t(
23
      'Are you sure you want to delete entity browser %label?',
24
      ['%label' => $this->entity->label()]
25
    );
26
  }
27
28
  /**
29
   * {@inheritdoc}
30
   */
31
  public function getConfirmText() {
32
    return $this->t('Delete Entity Browser');
33
  }
34
35
  /**
36
   * {@inheritdoc}
37
   */
38
  public function getCancelUrl() {
39
    return new Url('entity.entity_browser.collection');
40
  }
41
42
  /**
43
   * {@inheritdoc}
44
   */
45
  protected function getDeletionMessage() {
46
    return $this->t(
47
      'Entity browser %label was deleted.',
48
      ['%label' => $this->entity->label()]
49
    );
50
  }
51
52
}
53