You are here

public function ImageEmbedBlock::blockSubmit in File Entity Browser 8

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/ImageEmbedBlock.php, line 197

Class

ImageEmbedBlock
Provides the "Image Embed" block.

Namespace

Drupal\file_browser\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this->configuration['files'] = [];
  foreach ($form_state
    ->getValue([
    'selection',
    'table',
  ], []) as $fid => $settings) {
    $this->configuration['files'][] = [
      'fid' => $fid,
      'settings' => $settings,
    ];
  }
  $this->configuration['image_style'] = $form_state
    ->getValue('image_style');
}