Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / comment / src / Form / ConfirmDeleteMultiple.php
1 <?php
2
3 namespace Drupal\comment\Form;
4
5 use Drupal\Core\Entity\Form\DeleteMultipleForm as EntityDeleteMultipleForm;
6 use Drupal\Core\Url;
7
8 /**
9  * Provides the comment multiple delete confirmation form.
10  *
11  * @internal
12  */
13 class ConfirmDeleteMultiple extends EntityDeleteMultipleForm {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function getQuestion() {
19     return $this->formatPlural(count($this->selection), 'Are you sure you want to delete this comment and all its children?', 'Are you sure you want to delete these comments and all their children?');
20   }
21
22   /**
23    * {@inheritdoc}
24    */
25   public function getCancelUrl() {
26     return new Url('comment.admin');
27   }
28
29   /**
30    * {@inheritdoc}
31    */
32   protected function getDeletedMessage($count) {
33     return $this->formatPlural($count, 'Deleted @count comment.', 'Deleted @count comments.');
34   }
35
36   /**
37    * {@inheritdoc}
38    */
39   protected function getInaccessibleMessage($count) {
40     return $this->formatPlural($count, "@count comment has not been deleted because you do not have the necessary permissions.", "@count comments have not been deleted because you do not have the necessary permissions.");
41   }
42
43 }