public BlockBase::label()
Returns the user-facing block label.
@todo Provide other specific label-related methods in https://www.drupal.org/node/2025649.
string The block label.
Overrides BlockPluginInterface::label
public function label() { if (!empty($this->configuration['label'])) { return $this->configuration['label']; } $definition = $this->getPluginDefinition(); // Cast the admin label to a string since it is an object. // @see \Drupal\Core\StringTranslation\TranslatableMarkup return (string) $definition['admin_label']; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Block!BlockBase.php/function/BlockBase::label/8.1.x