BlockBase::setConfigurationValue

public BlockBase::setConfigurationValue($key, $value) Sets a particular value in the block settings. @todo This doesn't belong here. Move this into a new base class in https://www.drupal.org/node/1764380. @todo This does not set a value in \Drupal::config(), so the name is confusing. Parameters string $key: The key of PluginBase::$configuration to set. mixed $value: The value to set for the provided key. Overrides BlockPluginInterface::setConfigurationValue See also \Drupal\Component\Plugin\P

BlockBase::validateConfigurationForm

public BlockBase::validateConfigurationForm(array &$form, FormStateInterface $form_state) Most block plugins should not override this method. To add validation for a specific block type, override BlockBase::blockValidate(). Overrides PluginFormInterface::validateConfigurationForm See also \Drupal\Core\Block\BlockBase::blockValidate() File core/lib/Drupal/Core/Block/BlockBase.php, line 202 Class BlockBase Defines a base block implementation that most blocks plugins will extend. Name

BlockBase::submitConfigurationForm

public BlockBase::submitConfigurationForm(array &$form, FormStateInterface $form_state) Most block plugins should not override this method. To add submission handling for a specific block type, override BlockBase::blockSubmit(). Overrides PluginFormInterface::submitConfigurationForm See also \Drupal\Core\Block\BlockBase::blockSubmit() File core/lib/Drupal/Core/Block/BlockBase.php, line 222 Class BlockBase Defines a base block implementation that most blocks plugins will extend. Nam

BlockBase::__construct

public BlockBase::__construct(array $configuration, $plugin_id, $plugin_definition) Overrides \Drupal\Component\Plugin\PluginBase::__construct(). Overrides the construction of context aware plugins to allow for unvalidated constructor based injection of contexts. Parameters array $configuration: The plugin configuration, i.e. an array with configuration values keyed by configuration option name. The special key 'context' may be used to initialize the defined contexts by setting it to an array

BlockBase::transliteration

protected BlockBase::transliteration() Wraps the transliteration service. Return value \Drupal\Component\Transliteration\TransliterationInterface File core/lib/Drupal/Core/Block/BlockBase.php, line 260 Class BlockBase Defines a base block implementation that most blocks plugins will extend. Namespace Drupal\Core\Block Code protected function transliteration() { if (!$this->transliteration) { $this->transliteration = \Drupal::transliteration(); } return $this->transl

BlockBase::setConfiguration

public BlockBase::setConfiguration(array $configuration) Sets the configuration for this plugin instance. Parameters array $configuration: An associative array containing the plugin's configuration. Overrides ConfigurablePluginInterface::setConfiguration File core/lib/Drupal/Core/Block/BlockBase.php, line 71 Class BlockBase Defines a base block implementation that most blocks plugins will extend. Namespace Drupal\Core\Block Code public function setConfiguration(array $configuration) {

BlockBase::buildConfigurationForm

public BlockBase::buildConfigurationForm(array $form, FormStateInterface $form_state) Creates a generic configuration form for all block types. Individual block plugins can add elements to this form by overriding BlockBase::blockForm(). Most block plugins should not override this method unless they need to alter the generic form elements. Overrides PluginFormInterface::buildConfigurationForm See also \Drupal\Core\Block\BlockBase::blockForm() File core/lib/Drupal/Core/Block/BlockBase.php, line

BlockBase::getConfiguration

public BlockBase::getConfiguration() Gets this plugin's configuration. Return value array An array of this plugin's configuration. Overrides ConfigurablePluginInterface::getConfiguration File core/lib/Drupal/Core/Block/BlockBase.php, line 64 Class BlockBase Defines a base block implementation that most blocks plugins will extend. Namespace Drupal\Core\Block Code public function getConfiguration() { return $this->configuration; }

BlockBase::getMachineNameSuggestion

public BlockBase::getMachineNameSuggestion() Suggests a machine name to identify an instance of this block. The block plugin need not verify that the machine name is at all unique. It is only responsible for providing a baseline suggestion; calling code is responsible for ensuring whatever uniqueness is required for the use case. Return value string The suggested machine name. Overrides BlockPluginInterface::getMachineNameSuggestion File core/lib/Drupal/Core/Block/BlockBase.php, line 240 Cl

BlockBase::defaultConfiguration

public BlockBase::defaultConfiguration() Gets default configuration for this plugin. Return value array An associative array with the default configuration. Overrides ConfigurablePluginInterface::defaultConfiguration File core/lib/Drupal/Core/Block/BlockBase.php, line 97 Class BlockBase Defines a base block implementation that most blocks plugins will extend. Namespace Drupal\Core\Block Code public function defaultConfiguration() { return array(); }