You are here

public function SocialMediaLinksBlock::blockSubmit in Social Media Links Block and Field 8.2

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/SocialMediaLinksBlock.php, line 343

Class

SocialMediaLinksBlock
Provides the Social Media Links Block.

Namespace

Drupal\social_media_links\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this
    ->setConfigurationValue('platforms', $form_state
    ->getValue('platforms'));
  $this
    ->setConfigurationValue('appearance', $form_state
    ->getValue('appearance'));
  $this
    ->setConfigurationValue('link_attributes', $form_state
    ->getValue('link_attributes'));
  $iconset = $form_state
    ->getValue('iconset');
  unset($iconset['iconset']['installed_iconsets']);
  $this
    ->setConfigurationValue('iconset', $iconset);
}