EntityBrowserDeleteForm::getDeletionMessage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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