AutowireErrorBlock.php
Namespace
Drupal\autowire_test\Plugin\BlockFile
-
core/
modules/ system/ tests/ modules/ autowire_test/ src/ Plugin/ Block/ AutowireErrorBlock.php
View source
<?php
declare (strict_types=1);
namespace Drupal\autowire_test\Plugin\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Block\Attribute\Block;
use Drupal\Core\Lock\LockBackendInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
/**
* Provides a block that cannot be autowired.
*/
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 [];
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
AutowireErrorBlock | Provides a block that cannot be autowired. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.