public function Group::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 Base::preBuild
File
- src/
Plugin/ Layer/ Group/ Group.php, line 200 - Layer: Heatmap.
Class
- Group
- Class Group.
Namespace
Drupal\openlayers\Plugin\Layer\GroupCode
public function preBuild(array &$build, ObjectInterface $context = NULL) {
/** @var LayerInterface $layer */
foreach ($context
->getObjects('layer') as $layer) {
$layer
->setOption('title', $layer
->getName());
}
}