Completed
Pull Request — 8.x-1.x (#126)
by Janez
02:09
created

EntityBrowserDeleteForm::getQuestion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 2 Features 0
Metric Value
c 2
b 2
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
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
use Drupal\Core\Form\FormStateInterface;
13
14
/**
15
 * Delete confirm form for entity browsers.
16
 */
17
class EntityBrowserDeleteForm extends EntityDeleteForm {
18
19
  /**
20
   * {@inheritdoc}
21
   */
22
  public function getQuestion() {
23
    return $this->t('Are you sure you want to delete entity browser %label?', array(
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('Entity_browser %label was deleted.', array(
47
      '%label' => $this->entity->label(),
48
    ));
49
  }
50
51
}
52