Commit 33223ad7 authored by alexpott's avatar alexpott

Issue #2248951 by eojthebrave: Missing documentation for block plugin annotations.

parent 04d9f339
......@@ -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 = '';
}
......@@ -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']);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment