You are here

function openlayers_dependency_widget in Openlayers 6.2

Same name and namespace in other branches
  1. 7.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

1 call to openlayers_dependency_widget()
openlayers_ui_get_behavior_options in modules/openlayers_ui/includes/openlayers_ui.presets.inc
Get behavior options.

File

modules/openlayers_ui/openlayers_ui.module, line 686

Code

function openlayers_dependency_widget($dependencies) {
  if (is_array($dependencies) > 0) {
    $dependency_form = array();
    foreach ($dependencies as $dependency) {
      $dependency_form[] = array(
        '#type' => 'markup',
        '#value' => "<div class='openlayers-dependency-flag'>\n             <span class='openlayers-dependency-value'>{$dependency}</span>" . "<span class='openlayers-dependency-broken'>" . t('Dependency not found:') . ' ' . $dependency . "</span>" . "</div>",
      );
    }
    return $dependency_form;
  }
}