Newer
Older
Angie Byron
committed
<?php
namespace Drupal\comment\Form;
use Drupal\Core\Entity\Form\DeleteMultipleForm as EntityDeleteMultipleForm;
Angie Byron
committed
use Drupal\Core\Url;
Angie Byron
committed
/**
* Provides the comment multiple delete confirmation form.
*
* @internal
Angie Byron
committed
*/
class ConfirmDeleteMultiple extends EntityDeleteMultipleForm {
Angie Byron
committed
/**
* {@inheritdoc}
*/
public function getQuestion() {
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?');
Angie Byron
committed
}
/**
* {@inheritdoc}
*/
public function getCancelUrl() {
Angie Byron
committed
return new Url('comment.admin');
Angie Byron
committed
}
/**
* {@inheritdoc}
*/
protected function getDeletedMessage($count) {
return $this->formatPlural($count, 'Deleted @count comment.', 'Deleted @count comments.');
Angie Byron
committed
}
/**
* {@inheritdoc}
*/
protected function getInaccessibleMessage($count) {
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.");