BlockContentDeleteForm.php in Drupal 9
File
core/modules/block_content/src/Form/BlockContentDeleteForm.php
View source
<?php
namespace Drupal\block_content\Form;
use Drupal\Core\Entity\ContentEntityDeleteForm;
class BlockContentDeleteForm extends ContentEntityDeleteForm {
public function getDescription() {
$instances = $this->entity
->getInstances();
if (!empty($instances)) {
return $this
->formatPlural(count($instances), 'This will also remove 1 placed block instance. This action cannot be undone.', 'This will also remove @count placed block instances. This action cannot be undone.');
}
return parent::getDescription();
}
}