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

8.0.x
Alex Pott 2014-05-05 11:47:36 +01:00
parent 04d9f33941
commit 33223ad729
2 changed files with 17 additions and 1 deletions

View File

@ -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 = '';
}

View File

@ -61,7 +61,7 @@ class BlockManager extends DefaultPluginManager {
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']);
}
}