public function FractionsliderConfigurableTextBlock::blockForm in Views FractionSlider 8
Overrides BlockPluginTrait::blockForm
File
- src/
Plugin/ Block/ FractionsliderConfigurableTextBlock.php, line 57
Class
- FractionsliderConfigurableTextBlock
- Provides a 'Example: configurable text string' block.
Namespace
Drupal\fractionslider\Plugin\BlockCode
public function blockForm($form, FormStateInterface $form_state) {
$form['fractionslider_string_text'] = [
'#type' => 'textarea',
'#title' => $this
->t('FractionSlider HTML'),
'#rows' => 25,
'#description' => $this
->t('This is what HTML structure for FractionSlider. Change elements/text under < div class="slide"> to see changes.'),
'#default_value' => $this->configuration['fractionslider_string'],
];
$form['fractionslider_controls'] = [
'#type' => 'select',
'#title' => $this
->t('Controls'),
'#options' => [
'true' => $this
->t('True'),
'false' => $this
->t('False'),
],
'#default_value' => $this->configuration['fractionslider_controls'],
'#description' => $this
->t('Controls on/off'),
];
$form['fractionslider_pager'] = [
'#type' => 'select',
'#title' => $this
->t('Pager'),
'#options' => [
'true' => $this
->t('True'),
'false' => $this
->t('False'),
],
'#default_value' => $this->configuration['fractionslider_pager'],
'#description' => $this
->t("Pager inside of the slider on/off."),
];
$form['fractionslider_dimensions'] = [
'#type' => 'textfield',
'#title' => $this
->t('Dimensions'),
'#default_value' => $this->configuration['fractionslider_dimensions'],
'#description' => $this
->t('Default: 1000, 400'),
];
$form['fractionslider_fullwidth'] = [
'#type' => 'select',
'#title' => $this
->t('Full width'),
'#options' => [
'true' => $this
->t('True'),
'false' => $this
->t('False'),
],
'#default_value' => $this->configuration['fractionslider_fullwidth'],
'#description' => $this
->t('Default: false'),
];
$form['fractionslider_responsive'] = [
'#type' => 'select',
'#title' => $this
->t('Responsive'),
'#options' => [
'true' => $this
->t('True'),
'false' => $this
->t('False'),
],
'#default_value' => $this->configuration['fractionslider_responsive'],
'#description' => $this
->t('Default: true'),
];
$form['fractionslider_pausehover'] = [
'#type' => 'select',
'#title' => $this
->t('Pause on Hover'),
'#options' => [
'false' => $this
->t('False'),
'true' => $this
->t('True'),
],
'#default_value' => $this->configuration['fractionslider_pausehover'],
'#description' => $this
->t('Default: false'),
];
$form['fractionslider_increase'] = [
'#type' => 'select',
'#title' => $this
->t('Increase'),
'#options' => [
'true' => $this
->t('True'),
'false' => $this
->t('False'),
],
'#default_value' => $this->configuration['fractionslider_increase'],
'#description' => $this
->t('Default: false'),
];
return $form;
}