You are here

public function FloatingSocialIconsBlock::blockSubmit in Floating Social Icons 8

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/FloatingSocialIconsBlock.php, line 384

Class

FloatingSocialIconsBlock
Provides a 'Floating Social Icon' Block.

Namespace

Drupal\floating_social_icons\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  parent::blockSubmit($form, $form_state);
  $values = $form_state
    ->getValues();
  $this->configuration['facebook'] = $values['floating_facebook']['facebook_link'];
  $this->configuration['google_plus'] = $values['floating_google_plus']['google_plus_link'];
  $this->configuration['linkedIn'] = $values['floating_linkedIn']['linkedIn_link'];
  $this->configuration['twitter'] = $values['floating_twitter']['twitter_link'];
  $this->configuration['pinterest'] = $values['floating_pinterest']['pinterest_link'];
  $this->configuration['instagram'] = $values['floating_instagram']['instagram_link'];
  $this->configuration['mail'] = $values['floating_mail']['mail_link'];
  $this->configuration['youtube'] = $values['floating_youtube']['youtube_link'];
  $this->configuration['place'] = $values['floating_icons']['place'];
  $this->configuration['target'] = $values['floating_icons']['target'];
  $this->configuration['hover'] = $values['floating_icons']['hover'];

  // Setting Config for Titles.
  $this->configuration['facebook_title'] = $values['floating_facebook']['facebook_title'];
  $this->configuration['google_plus_title'] = $values['floating_google_plus']['google_plus_title'];
  $this->configuration['linkedIn_title'] = $values['floating_linkedIn']['linkedIn_title'];
  $this->configuration['twitter_title'] = $values['floating_twitter']['twitter_title'];
  $this->configuration['pinterest_title'] = $values['floating_pinterest']['pinterest_title'];
  $this->configuration['instagram_title'] = $values['floating_instagram']['instagram_title'];
  $this->configuration['mail_title'] = $values['floating_mail']['mail_title'];
  $this->configuration['youtube_title'] = $values['floating_youtube']['youtube_title'];
}