3 namespace Drupal\Core\Block\Plugin\Block;
5 use Drupal\Core\Block\BlockBase;
6 use Drupal\Core\Form\FormStateInterface;
9 * Defines a fallback plugin for missing block plugins.
13 * admin_label = @Translation("Broken/Missing"),
14 * category = @Translation("Block"),
17 class Broken extends BlockBase {
22 public function build() {
23 return $this->brokenMessage();
29 public function blockForm($form, FormStateInterface $form_state) {
30 return $this->brokenMessage();
34 * Generate message with debugging information as to why the block is broken.
37 * Render array containing debug information.
39 protected function brokenMessage() {
41 '#markup' => $this->t('This block is broken or missing. You may be missing content or you might need to enable the original module.'),