You are here

public function SystemBrandingBlock::blockSubmit in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Plugin/Block/SystemBrandingBlock.php \Drupal\system\Plugin\Block\SystemBrandingBlock::blockSubmit()

Adds block type-specific submission handling for the block form.

Note that this method takes the form structure and form state for the full block configuration form as arguments, not just the elements defined in BlockPluginInterface::blockForm().

Parameters

array $form: The form definition array for the full block configuration form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides BlockBase::blockSubmit

See also

\Drupal\Core\Block\BlockPluginInterface::blockForm()

\Drupal\Core\Block\BlockPluginInterface::blockValidate()

File

core/modules/system/src/Plugin/Block/SystemBrandingBlock.php, line 147
Contains \Drupal\system\Plugin\Block\SystemBrandingBlock.

Class

SystemBrandingBlock
Provides a block to display 'Site branding' elements.

Namespace

Drupal\system\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $block_branding = $form_state
    ->getValue('block_branding');
  $this->configuration['use_site_logo'] = $block_branding['use_site_logo'];
  $this->configuration['use_site_name'] = $block_branding['use_site_name'];
  $this->configuration['use_site_slogan'] = $block_branding['use_site_slogan'];
}