You are here

public function Base::getJS in Openlayers 7.3

!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .

Overrides ObjectInterface::getJS

6 calls to Base::getJS()
Field::getJS in modules/openlayers_field/src/Plugin/Source/Field/Field.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .
GeoJSON::getJS in src/Plugin/Source/GeoJSON/GeoJSON.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .
IconSprites::getJS in modules/openlayers_library/src/Plugin/Component/IconSprites/IconSprites.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .
Map::getJS in src/Types/Map.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .
Style::getJS in src/Types/Style.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .

... See full list

6 methods override Base::getJS()
Field::getJS in modules/openlayers_field/src/Plugin/Source/Field/Field.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .
GeoJSON::getJS in src/Plugin/Source/GeoJSON/GeoJSON.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .
IconSprites::getJS in modules/openlayers_library/src/Plugin/Component/IconSprites/IconSprites.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .
Map::getJS in src/Types/Map.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .
Style::getJS in src/Types/Style.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .

... See full list

File

src/Types/Base.php, line 506
Class Object.

Class

Base
Class Base.

Namespace

Drupal\openlayers\Types

Code

public function getJS() {
  $export = $this
    ->getExport();
  array_map(function ($type) use ($export) {
    unset($export->options[$type . 's']);
  }, Openlayers::getPluginTypes());
  $js = array(
    'mn' => $export->machine_name,
    'fs' => $export->factory_service,
  );
  if (!empty($export->options)) {
    $js['opt'] = $export->options;
  }
  return $js;
}