class BlockBase
Same name in other branches
- 9 core/lib/Drupal/Core/Block/BlockBase.php \Drupal\Core\Block\BlockBase
- 10 core/lib/Drupal/Core/Block/BlockBase.php \Drupal\Core\Block\BlockBase
- 11.x core/lib/Drupal/Core/Block/BlockBase.php \Drupal\Core\Block\BlockBase
Defines a base block implementation that most blocks plugins will extend.
This abstract class provides the generic block configuration form, default block settings, and handling for general user-defined block visibility settings.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Component\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\ContextAwarePluginInterface
- class \Drupal\Core\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\ContextAwarePluginBase implements \Drupal\Core\Plugin\ContextAwarePluginInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Core\TypedData\TypedDataTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Core\Block\BlockBase extends \Drupal\Core\Plugin\ContextAwarePluginBase implements \Drupal\Core\Block\BlockPluginInterface, \Drupal\Core\Plugin\PluginWithFormsInterface, \Drupal\Core\Render\PreviewFallbackInterface uses \Drupal\Core\Block\BlockPluginTrait, \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait
- class \Drupal\Core\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\ContextAwarePluginBase implements \Drupal\Core\Plugin\ContextAwarePluginInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Core\TypedData\TypedDataTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Component\Plugin\ContextAwarePluginBase extends \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\ContextAwarePluginInterface
Expanded class hierarchy of BlockBase
Related topics
46 files declare their use of BlockBase
- AggregatorFeedBlock.php in core/
modules/ aggregator/ src/ Plugin/ Block/ AggregatorFeedBlock.php - AjaxFormBlock.php in core/
modules/ system/ tests/ modules/ ajax_forms_test/ src/ Plugin/ Block/ AjaxFormBlock.php - AttachedRenderingBlock.php in core/
modules/ system/ tests/ modules/ render_attached_test/ src/ Plugin/ Block/ AttachedRenderingBlock.php - BlockContentBlock.php in core/
modules/ block_content/ src/ Plugin/ Block/ BlockContentBlock.php - BlockFormTest.php in core/
modules/ block/ tests/ src/ Unit/ BlockFormTest.php
File
-
core/
lib/ Drupal/ Core/ Block/ BlockBase.php, line 19
Namespace
Drupal\Core\BlockView source
abstract class BlockBase extends ContextAwarePluginBase implements BlockPluginInterface, PluginWithFormsInterface, PreviewFallbackInterface {
use BlockPluginTrait;
use ContextAwarePluginAssignmentTrait;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.