diff --git a/core/modules/block/lib/Drupal/block/Annotation/Block.php b/core/modules/block/lib/Drupal/block/Annotation/Block.php index 64987e6bef57bd4747818b48ebc81b55f17861ab..ec093be5cb0ebd8c658cec9f3613ee3777a96406 100644 --- a/core/modules/block/lib/Drupal/block/Annotation/Block.php +++ b/core/modules/block/lib/Drupal/block/Annotation/Block.php @@ -32,4 +32,20 @@ class Block extends Plugin { */ public $admin_label = ''; + /** + * The category in the admin UI where the block will be listed. + * + * @var \Drupal\Core\Annotation\Translation + * + * @ingroup plugin_translatable + */ + public $category = ''; + + /** + * Class used to retrieve derivative definitions of the block. + * + * @var string + */ + public $derivative = ''; + } diff --git a/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php b/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php index bb76ec25cfaf5fcdee41c422143eb8b3c079c269..e6252ebdd2ad5916a62ba3f42e7b6061c7ee0fb8 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php +++ b/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php @@ -61,7 +61,7 @@ public function processDefinition(&$definition, $plugin_id) { parent::processDefinition($definition, $plugin_id); // Ensure that every block has a category. - if (!isset($definition['category'])) { + if (empty($definition['category'])) { $definition['category'] = $this->getModuleName($definition['provider']); } }