BlockBase.php 730 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Drupal\Core\Block;
  3. use Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait;
  4. use Drupal\Core\Plugin\ContextAwarePluginBase;
  5. use Drupal\Core\Plugin\PluginWithFormsInterface;
  6. use Drupal\Core\Render\PreviewFallbackInterface;
  7. /**
  8. * Defines a base block implementation that most blocks plugins will extend.
  9. *
  10. * This abstract class provides the generic block configuration form, default
  11. * block settings, and handling for general user-defined block visibility
  12. * settings.
  13. *
  14. * @ingroup block_api
  15. */
  16. abstract class BlockBase extends ContextAwarePluginBase implements BlockPluginInterface, PluginWithFormsInterface, PreviewFallbackInterface {
  17. use BlockPluginTrait;
  18. use ContextAwarePluginAssignmentTrait;
  19. }