public function ViewsAttachLibraryDisplayExtender::buildOptionsForm in Views Attach Library 8.x
Same name and namespace in other branches
- 8 src/Plugin/views/display_extender/ViewsAttachLibraryDisplayExtender.php \Drupal\views_attach_library\Plugin\views\display_extender\ViewsAttachLibraryDisplayExtender::buildOptionsForm()
- 2.0.x src/Plugin/views/display_extender/ViewsAttachLibraryDisplayExtender.php \Drupal\views_attach_library\Plugin\views\display_extender\ViewsAttachLibraryDisplayExtender::buildOptionsForm()
Provide a form to edit options for this plugin.
Overrides DisplayExtenderPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ display_extender/ ViewsAttachLibraryDisplayExtender.php, line 25
Class
- ViewsAttachLibraryDisplayExtender
- Views Attach Library display extender plugin.
Namespace
Drupal\views_attach_library\Plugin\views\display_extenderCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
if ($form_state
->get('section') == 'attach_library') {
$form['attach_library'] = [
'#type' => 'textfield',
'#title' => 'Add Libraries',
'#description' => $this
->t('Add library name in textfield , for exmaple ' . 'add <b>"abc/xyz"</b> where <b>abc</b> is module or theme name and ' . '<b>xyz</b> is library name. For more info please read README.txt file.'),
'#default_value' => !empty($this->options['attach_library']['attach_library']) ? $this->options['attach_library']['attach_library'] : '',
];
}
}