3 namespace Drupal\block_content\Form;
5 use Drupal\Core\Entity\ContentEntityDeleteForm;
6 use Drupal\Core\Form\FormStateInterface;
9 * Provides a confirmation form for deleting a custom block entity.
13 class BlockContentDeleteForm extends ContentEntityDeleteForm {
18 public function buildForm(array $form, FormStateInterface $form_state) {
19 $instances = $this->entity->getInstances();
22 '#markup' => $this->formatPlural(count($instances), 'This will also remove 1 placed block instance.', 'This will also remove @count placed block instances.'),
23 '#access' => !empty($instances),
26 return parent::buildForm($form, $form_state);