function StatisticsPopularBlock::blockSubmit

Same name in other branches
  1. 9 core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php \Drupal\statistics\Plugin\Block\StatisticsPopularBlock::blockSubmit()
  2. 8.9.x core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php \Drupal\statistics\Plugin\Block\StatisticsPopularBlock::blockSubmit()
  3. 10 core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php \Drupal\statistics\Plugin\Block\StatisticsPopularBlock::blockSubmit()

Overrides BlockPluginTrait::blockSubmit

File

core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php, line 148

Class

StatisticsPopularBlock
Provides a 'Popular content' block.

Namespace

Drupal\statistics\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
    $this->configuration['top_day_num'] = $form_state->getValue('statistics_block_top_day_num');
    $this->configuration['top_all_num'] = $form_state->getValue('statistics_block_top_all_num');
    $this->configuration['top_last_num'] = $form_state->getValue('statistics_block_top_last_num');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.