You are here

public function FacebookCommentsBlock::blockSubmit in Facebook Comments Block 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Block/FacebookCommentsBlock.php \Drupal\facebook_comments_block\Plugin\Block\FacebookCommentsBlock::blockSubmit()

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/FacebookCommentsBlock.php, line 268

Class

FacebookCommentsBlock
Provides a 'Facebook Comments Block' block.

Namespace

Drupal\facebook_comments_block\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this
    ->setConfigurationValue('facebook_comments_block_settings_app_id', $form_state
    ->getValue(array(
    'facebook_comments_settings',
    'facebook_comments_block_settings_app_id',
  )));
  $this
    ->setConfigurationValue('facebook_comments_block_settings_domain', rtrim(rtrim($form_state
    ->getValue(array(
    'facebook_comments_settings',
    'facebook_comments_block_settings_domain',
  ))), '/'));
  $this
    ->setConfigurationValue('facebook_comments_block_settings_lang', $form_state
    ->getValue(array(
    'facebook_comments_settings',
    'facebook_comments_block_settings_lang',
  )));
  $this
    ->setConfigurationValue('facebook_comments_block_settings_color_schema', $form_state
    ->getValue(array(
    'facebook_comments_settings',
    'facebook_comments_block_settings_color_schema',
  )));
  $this
    ->setConfigurationValue('facebook_comments_block_settings_order', $form_state
    ->getValue(array(
    'facebook_comments_settings',
    'facebook_comments_block_settings_order',
  )));
  $this
    ->setConfigurationValue('facebook_comments_block_settings_number_of_posts', $form_state
    ->getValue(array(
    'facebook_comments_settings',
    'facebook_comments_block_settings_number_of_posts',
  )));
  $this
    ->setConfigurationValue('facebook_comments_block_settings_width_unit', $form_state
    ->getValue(array(
    'facebook_comments_settings',
    'facebook_comments_block_settings_width_unit',
  )));
  $this
    ->setConfigurationValue('facebook_comments_block_settings_width', $form_state
    ->getValue(array(
    'facebook_comments_settings',
    'facebook_comments_block_settings_width',
  )));
}