mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-02 04:53:56 +01:00
49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @package dev
|
||
|
|
* @author David Molineus <david.molineus@netzmacht.de>
|
||
|
|
* @copyright 2015 netzmacht creative David Molineus
|
||
|
|
* @license LGPL 3.0
|
||
|
|
* @filesource
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
|
||
|
|
namespace Netzmacht\Contao\Leaflet\Mapper\Style;
|
||
|
|
|
||
|
|
use Netzmacht\LeafletPHP\Definition;
|
||
|
|
|
||
|
|
class FixedStyleMapper extends AbstractStyleMapper
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Definition class.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
protected static $definitionClass = 'Netzmacht\Contao\Leaflet\Definition\Style\FixedStyle';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Style type.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
protected static $type = 'fixed';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* {@inheritdoc}
|
||
|
|
*/
|
||
|
|
protected function initialize()
|
||
|
|
{
|
||
|
|
parent::initialize();
|
||
|
|
|
||
|
|
$this
|
||
|
|
->addOptions('stroke', 'weight', 'opacity', 'clickable', 'className')
|
||
|
|
->addConditionalOption('color')
|
||
|
|
->addConditionalOption('lineCap')
|
||
|
|
->addConditionalOption('lineJoin')
|
||
|
|
->addConditionalOption('dashArray')
|
||
|
|
->addConditionalOptions('fill', array('fillColor', 'fillOpacity'))
|
||
|
|
->addOption('fill');
|
||
|
|
}
|
||
|
|
}
|