public function openlayers::options_form in Openlayers 7.3
Provide options to configure content.
Overrides boxes_box::options_form
File
- modules/
openlayers_boxes/ plugins/ boxes/ openlayers.php, line 24 - Openlayers boxes plugin.
Class
- openlayers
- Class openlayers.
Code
public function options_form(&$form_state) {
$form = array();
// Map objects.
$form['map'] = array(
'#type' => 'select',
'#title' => t('Openlayers map'),
'#description' => t('Map to display.'),
'#options' => \Drupal\openlayers\Openlayers::loadAllAsOptions('Map'),
"#empty_option" => t('- Select a Map -'),
'#default_value' => $this->options['map'] ? $this->options['map'] : '',
);
return $form;
}