Rework element id generation.

This commit is contained in:
David Molineus
2015-01-09 13:41:09 +01:00
parent 37851110b0
commit efb36256c7
12 changed files with 128 additions and 88 deletions

View File

@@ -65,8 +65,12 @@ class ProviderLayerMapper extends AbstractLayerMapper
/**
* {@inheritdoc}
*/
protected function build(Definition $definition, \Model $model, DefinitionMapper $builder, LatLngBounds $bounds = null)
{
protected function build(
Definition $definition,
\Model $model,
DefinitionMapper $builder,
LatLngBounds $bounds = null
) {
if (!empty($this->providers[$model->tile_provider]['options'])) {
$this->applyOptions(
$this->providers[$model->tile_provider]['options'],
@@ -79,8 +83,12 @@ class ProviderLayerMapper extends AbstractLayerMapper
/**
* {@inheritdoc}
*/
protected function buildConstructArguments(\Model $model, DefinitionMapper $mapper, LatLngBounds $bounds = null)
{
protected function buildConstructArguments(
\Model $model,
DefinitionMapper $mapper,
LatLngBounds $bounds = null,
$elementId = null
) {
return array(
$model->alias ?: ('layer_' . $model->id),
$model->tile_provider,