openlayers-8.x-4.x-dev/src/Plugin/Component/Graticule/Graticule.php
src/Plugin/Component/Graticule/Graticule.php
<?php
namespace Drupal\openlayers\Plugin\Component\Graticule;
use Drupal\Core\Form\FormStateInterface;
use Drupal\openlayers\Types\Component;
/**
* FIX - Insert short comment here.
*
* @OpenlayersPlugin(
* id = "ol_component_graticule",
* label = @Translation("Graticule"),
* description = @Translation("TODO..."),
* service = "openlayers.Component:Graticule",
* library = "openlayers-plugin-component-graticule",
* is_configurable = "true",
* type = "component"
* )
*/
class Graticule extends Component {
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form['options']['rgba'] = array(
'#type' => 'textfield',
'#title' => t('RGBA'),
'#default_value' => $this->getOption('rgba', '0, 0, 0, 0.2'),
'#description' => t('RGBA, a string of 4 numbers, separated by a comma.'),
);
$form['options']['width'] = array(
'#type' => 'textfield',
'#title' => t('Width'),
'#default_value' => $this->getOption('width', 2),
'#description' => t('Width'),
);
$form['options']['lineDash'] = array(
'#type' => 'textfield',
'#title' => t('Line dash'),
'#default_value' => $this->getOption('lineDash', '0.5, 4'),
'#description' => t('Line dash, a string of 2 numbers, separated by a comma.'),
);
return $form;
}
/**
* {@inheritdoc}
*/
public function optionsForm(array &$form, array &$form_state) {
}
}
