public function DisqusRecentCommentBlock::blockForm in Disqus 8
Overrides DisqusBaseBlock::blockForm
File
- src/
Plugin/ Block/ DisqusRecentCommentBlock.php, line 43
Class
- DisqusRecentCommentBlock
- Plugin implementation of the 'disqus_recent_comments'.
Namespace
Drupal\disqus\Plugin\BlockCode
public function blockForm($form, FormStateInterface $form_state) {
$form = parent::blockForm($form, $form_state);
$form['disqus']['show_avatars'] = [
'#type' => 'select',
'#title' => $this
->t('Show avatars'),
'#options' => [
FALSE => $this
->t('No'),
TRUE => $this
->t('Yes'),
],
'#default_value' => $this->configuration['show_avatars'],
];
$form['disqus']['avatar_size'] = [
'#type' => 'select',
'#title' => $this
->t('Avatar size'),
'#options' => [
24 => $this
->t('X-Small (24px)'),
32 => $this
->t('Small (32px)'),
48 => $this
->t('Medium (48px)'),
92 => $this
->t('Large (92px)'),
128 => $this
->t('X-Large (128px)'),
],
'#default_value' => $this->configuration['avatar_size'],
];
$form['disqus']['excerpt_length'] = [
'#type' => 'textfield',
'#title' => $this
->t('Comment Except Length'),
'#default_value' => $this->configuration['excerpt_length'],
'#size' => 4,
];
return $form;
}