You are here

public function ContentEmbedBlock::blockSubmit in Content Browser 8

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/ContentEmbedBlock.php, line 195

Class

ContentEmbedBlock
Provides the "Content Embed" block.

Namespace

Drupal\content_browser\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this->configuration['nids'] = [];
  $this->configuration['uuids'] = [];
  foreach ($form_state
    ->getValue([
    'selection',
    'table',
  ], []) as $nid => $settings) {
    $this->configuration['nids'][] = $nid;
  }
  $this->configuration['view_mode'] = $form_state
    ->getValue('view_mode');
}