public function Swipe::postBuild in Openlayers 7.3
Invoked after 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::postBuild
File
- modules/
openlayers_library/ src/ Plugin/ Component/ Swipe/ Swipe.php, line 24 - Component: Swipe.
Class
- Swipe
- Class Swipe.
Namespace
Drupal\openlayers_library\Plugin\Component\SwipeCode
public function postBuild(array &$build, ObjectInterface $context = NULL) {
$build['parameters'][$this
->getPluginId()] = array(
'#type' => 'fieldset',
'#title' => 'Example Swipe component',
'swipe' => array(
'#type' => 'rangefield',
'#attributes' => array(
'id' => 'swipe',
'style' => 'width: 100%;',
),
),
);
$build['description']['#description'] = 'This example is based on the <a href="http://openlayers.org/en/master/examples/layer-swipe.html">offical swipe example</a>. You need the <em><a href="https://drupal.org/project/elements">elements</a></em> module to get it working properly.';
}