You are here

public function Base::getExport in Openlayers 7.3

Return an object, CTools Exportable.

Return value

\StdClass The object as CTools exportable.

Overrides ObjectInterface::getExport

3 calls to Base::getExport()
Base::getJS in src/Types/Base.php
!Attention! This function will remove any option that is named after a plugin type e.g.: layers, controls, styles, interactions, components .
Base::optionsFormSubmit in src/Types/Base.php
Submit callback for the options form.
Group::optionsFormSubmit in src/Plugin/Layer/Group/Group.php
Submit callback for the options form.

File

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

Class

Base
Class Base.

Namespace

Drupal\openlayers\Types

Code

public function getExport() {
  $configuration = $this
    ->getConfiguration();
  $options = $this
    ->getOptions();
  $options = Openlayers::array_map_recursive('\\Drupal\\openlayers\\Openlayers::floatval_if_numeric', (array) $options);
  $options = Openlayers::removeEmptyElements((array) $options);
  $configuration['options'] = $options;
  return (object) $configuration;
}