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.
11 class BlockContentDeleteForm extends ContentEntityDeleteForm {
16 public function buildForm(array $form, FormStateInterface $form_state) {
17 $instances = $this->entity->getInstances();
20 '#markup' => $this->formatPlural(count($instances), 'This will also remove 1 placed block instance.', 'This will also remove @count placed block instances.'),
21 '#access' => !empty($instances),
24 return parent::buildForm($form, $form_state);