Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

BlockContentDeleteForm.php

Namespace

Drupal\block_content\Form

File

core/modules/block_content/src/Form/BlockContentDeleteForm.php

View source
<?php

namespace Drupal\block_content\Form;

use Drupal\Core\Entity\ContentEntityDeleteForm;

/**
 * Provides a confirmation form for deleting a content block entity.
 *
 * @internal
 */
class BlockContentDeleteForm extends ContentEntityDeleteForm {
    
    /**
     * {@inheritdoc}
     */
    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();
    }

}

Classes

Title Deprecated Summary
BlockContentDeleteForm Provides a confirmation form for deleting a content block entity.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal