public function BlazyViews::buildOptionsForm in Blazy 8
Same name and namespace in other branches
- 8.2 src/Plugin/views/style/BlazyViews.php \Drupal\blazy\Plugin\views\style\BlazyViews::buildOptionsForm()
Overrides StylePluginBase::buildOptionsForm().
Overrides StylePluginBase::buildOptionsForm
File
- src/
Plugin/ views/ style/ BlazyViews.php, line 77
Class
- BlazyViews
- Blazy style plugin.
Namespace
Drupal\blazy\Plugin\views\styleCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$definition = [
'namespace' => 'blazy',
'grid_form' => TRUE,
'settings' => $this->options,
'style' => TRUE,
'form_opening_classes' => 'form--blazy form--slick form--views form--half has-tooltip',
];
// Build the form.
$this
->admin()
->openingForm($form, $definition);
$this
->admin()
->gridForm($form, $definition);
if (isset($form['grid'])) {
$form['grid']['#description'] = $this
->t('The amount of block grid columns for large monitors 64.063em.');
}
$this
->admin()
->finalizeForm($form, $definition);
// Blazy doesn't need complex grid with multiple groups.
unset($form['layout'], $form['preserve_keys'], $form['grid_header'], $form['visible_items'], $form['style']['#empty_option'], $form['grid']['#empty_option']);
}