
| Current Path : /var/www/html/store1/vendor/chi-teck/drupal-code-generator/templates/plugin/views/style/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store1/vendor/chi-teck/drupal-code-generator/templates/plugin/views/style/style.twig |
<?php
namespace Drupal\{{ machine_name }}\Plugin\views\style;
{% if configurable %}
use Drupal\Core\Form\FormStateInterface;
{% endif %}
use Drupal\views\Plugin\views\style\StylePluginBase;
/**
* {{ plugin_label }} style plugin.
*
* @ViewsStyle(
* id = "{{ plugin_id }}",
* title = @Translation("{{ plugin_label }}"),
* help = @Translation("Foo style plugin help."),
* theme = "views_style_{{ plugin_id }}",
* display_types = {"normal"}
* )
*/
class {{ class }} extends StylePluginBase {
/**
* {@inheritdoc}
*/
protected $usesRowPlugin = TRUE;
/**
* {@inheritdoc}
*/
protected $usesRowClass = TRUE;
{% if configurable %}
/**
* {@inheritdoc}
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['wrapper_class'] = ['default' => 'item-list'];
return $options;
}
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['wrapper_class'] = [
'#title' => $this->t('Wrapper class'),
'#description' => $this->t('The class to provide on the wrapper, outside rows.'),
'#type' => 'textfield',
'#default_value' => $this->options['wrapper_class'],
];
}
{% endif %}
}