class AutowireErrorBlock

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/autowire_test/src/Plugin/Block/AutowireErrorBlock.php \Drupal\autowire_test\Plugin\Block\AutowireErrorBlock

Provides a block that cannot be autowired.

Attributes

#[Block(id: "autowire_error", admin_label: new TranslatableMarkup("Autowire error"))]

Hierarchy

Expanded class hierarchy of AutowireErrorBlock

File

core/modules/system/tests/modules/autowire_test/src/Plugin/Block/AutowireErrorBlock.php, line 16

Namespace

Drupal\autowire_test\Plugin\Block
View source
class AutowireErrorBlock extends BlockBase implements ContainerFactoryPluginInterface {
  
  /**
   * {@inheritdoc}
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, protected LockBackendInterface $lock) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
  }
  
  /**
   * {@inheritdoc}
   */
  public function build() {
    return [];
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.