You are here

public function RecentDownload::blockForm in Download Count 8

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/RecentDownload.php, line 109

Class

RecentDownload
Provides a 'Recent Download Count' block.

Namespace

Drupal\download_count\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form = parent::blockForm($form, $form_state);
  $config = $this
    ->getConfiguration();
  $form['download_count_recent_block_limit'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Number of items to display'),
    '#default_value' => isset($config['download_count_recent_block_limit']) ? $config['download_count_recent_block_limit'] : 10,
  ];
  return $form;
}