public function CodropsGoogleNexus::settingsForm in Responsive Menus 8
Form constructor.
Parameters
array $form: An associative array containing the initial structure of the plugin form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the complete form.
Return value
array The form structure.
Overrides ResponsiveMenusPluginBase::settingsForm
File
- src/
Plugin/ ResponsiveMenus/ CodropsGoogleNexus.php, line 46
Class
- CodropsGoogleNexus
- Defines the "google_nexus" plugin.
Namespace
Drupal\responsive_menus\Plugin\ResponsiveMenusCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$form['responsive_menus_google_nexus_css_selectors'] = [
'#type' => 'textfield',
'#title' => $this
->t('CSS selectors for which menu to responsify'),
'#default_value' => $this
->getSetting('responsive_menus_google_nexus_css_selectors'),
'#description' => t('Enter CSS/jQuery selector of menus to responsify.'),
];
$form['responsive_menus_google_nexus_use_ecoicons'] = [
'#type' => 'select',
'#title' => $this
->t('Use ecofonts font-family'),
'#options' => [
1 => $this
->t('Yes'),
0 => $this
->t('No'),
],
'#default_value' => $this
->getSetting('responsive_menus_google_nexus_use_ecoicons'),
'#description' => $this
->t('Uses the ecofonts font-family included with GoogleNexusWebsiteMenu library for icons.'),
];
$form['responsive_menus_google_nexus_icons'] = [
'#type' => 'textarea',
'#title' => $this
->t('Icons for menu items'),
'#default_value' => $this
->getSetting('responsive_menus_google_nexus_icons'),
];
$form['responsive_menus_google_nexus_icon_fallback'] = [
'#type' => 'textfield',
'#title' => $this
->t('Fallback icon for extra menu items'),
'#default_value' => $this
->getSetting('responsive_menus_google_nexus_icon_fallback'),
];
return $form;
}