annotate core/modules/comment/src/Form/ConfirmDeleteMultiple.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\comment\Form;
Chris@0 4
Chris@17 5 use Drupal\Core\Entity\Form\DeleteMultipleForm as EntityDeleteMultipleForm;
Chris@0 6 use Drupal\Core\Url;
Chris@0 7
Chris@0 8 /**
Chris@0 9 * Provides the comment multiple delete confirmation form.
Chris@14 10 *
Chris@14 11 * @internal
Chris@0 12 */
Chris@17 13 class ConfirmDeleteMultiple extends EntityDeleteMultipleForm {
Chris@0 14
Chris@0 15 /**
Chris@0 16 * {@inheritdoc}
Chris@0 17 */
Chris@0 18 public function getQuestion() {
Chris@17 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?');
Chris@0 20 }
Chris@0 21
Chris@0 22 /**
Chris@0 23 * {@inheritdoc}
Chris@0 24 */
Chris@0 25 public function getCancelUrl() {
Chris@0 26 return new Url('comment.admin');
Chris@0 27 }
Chris@0 28
Chris@0 29 /**
Chris@0 30 * {@inheritdoc}
Chris@0 31 */
Chris@17 32 protected function getDeletedMessage($count) {
Chris@17 33 return $this->formatPlural($count, 'Deleted @count comment.', 'Deleted @count comments.');
Chris@0 34 }
Chris@0 35
Chris@0 36 /**
Chris@0 37 * {@inheritdoc}
Chris@0 38 */
Chris@17 39 protected function getInaccessibleMessage($count) {
Chris@17 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.");
Chris@0 41 }
Chris@0 42
Chris@0 43 }