You are here

public function FieldBlock::blockSubmit in Field as Block 8.2

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/FieldBlock.php, line 336

Class

FieldBlock
Provides a fieldblock.

Namespace

Drupal\fieldblock\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this->configuration['label_from_field'] = $form_state
    ->getValue('label_from_field');
  $this->configuration['field_name'] = $form_state
    ->getValue('field_name');
  $this->configuration['formatter_id'] = $form_state
    ->getValue([
    'formatter',
    'id',
  ], '');
  $this->configuration['formatter_settings'] = $form_state
    ->getValue([
    'formatter',
    'settings',
  ], []);
}