You are here

public function Base::preBuild in Openlayers 7.3

Invoked before an objects render array is built.

Mostly invoked by the map object.

Parameters

array $build: The array with the build information.

\Drupal\openlayers\Types\ObjectInterface $context: The context of the build. Mostly the map object.

Overrides ObjectInterface::preBuild

1 call to Base::preBuild()
LayerSwitcher::preBuild in src/Plugin/Control/LayerSwitcher/LayerSwitcher.php
Invoked before an objects render array is built.
4 methods override Base::preBuild()
GeofieldWidget::preBuild in modules/openlayers_geofield/src/Plugin/Component/GeofieldWidget/GeofieldWidget.php
Invoked before an objects render array is built.
Group::preBuild in src/Plugin/Layer/Group/Group.php
Invoked before an objects render array is built.
LayerSwitcher::preBuild in src/Plugin/Control/LayerSwitcher/LayerSwitcher.php
Invoked before an objects render array is built.
OL3LayerSwitcher::preBuild in modules/openlayers_library/src/Plugin/Control/OL3LayerSwitcher/OL3LayerSwitcher.php
Invoked before an objects render array is built.

File

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

Class

Base
Class Base.

Namespace

Drupal\openlayers\Types

Code

public function preBuild(array &$build, ObjectInterface $context = NULL) {
  foreach ($this
    ->getCollection()
    ->getFlatList() as $object) {
    if ($object !== $this) {
      $object
        ->preBuild($build, $context);
    }
  }
  drupal_alter('openlayers_object_preprocess', $build, $this);
}