You are here

public function ManagedAdBlock::blockSubmit in Google AdSense integration 8

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/ManagedAdBlock.php, line 255

Class

ManagedAdBlock
Provides an AdSense managed ad block.

Namespace

Drupal\adsense\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this->configuration['ad_slot'] = $form_state
    ->getValue('ad_slot');
  $this->configuration['ad_format'] = $form_state
    ->getValue('ad_format');
  $this->configuration['ad_width'] = $form_state
    ->getValue('ad_width');
  $this->configuration['ad_height'] = $form_state
    ->getValue('ad_height');
  $this->configuration['ad_shape'] = $form_state
    ->getValue('ad_shape');
  $this->configuration['ad_layout_key'] = $form_state
    ->getValue('ad_layout_key');
  $this->configuration['ad_align'] = $form_state
    ->getValue('ad_align');
}