function openlayers_dependency_widget in Openlayers 7.2
Same name and namespace in other branches
- 6.2 modules/openlayers_ui/openlayers_ui.module \openlayers_dependency_widget()
dependencies widget helper
Parameters
$dependencies: Array of Javascript dependencies as strings of function names
Return value
$form Form element of dependencies if any
File
- modules/
openlayers_ui/ openlayers_ui.module, line 299 - Main Drupal module file for the OpenLayers UI module
Code
function openlayers_dependency_widget($dependencies) {
if (is_array($dependencies) > 0) {
$dependency_form = array();
foreach ($dependencies as $dependency) {
$dependency_form[] = array(
'#markup' => "<div class='openlayers-dependency-flag'>" . "<span class='openlayers-dependency-value'>{$dependency}</span>" . "<span class='openlayers-dependency-broken'>" . t('Dependency not found:') . ' ' . $dependency . "</span>" . "</div>",
);
}
return $dependency_form;
}
}