function ForumBlockBase::blockForm

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

Overrides BlockPluginTrait::blockForm

File

core/modules/forum/src/Plugin/Block/ForumBlockBase.php, line 64

Class

ForumBlockBase
Provides a base class for Forum blocks.

Namespace

Drupal\forum\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
    $range = range(2, 20);
    $form['block_count'] = [
        '#type' => 'select',
        '#title' => $this->t('Number of topics'),
        '#default_value' => $this->configuration['block_count'],
        '#options' => array_combine($range, $range),
    ];
    return $form;
}

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