You are here

function qtip_fetch_instances in qTip (Stylish jQuery Tooltips) 7.2

Retrieve an associative array of all available qTip instances.

3 calls to qtip_fetch_instances()
ctools_qtip_content_type_edit_form in plugins/content_types/qtip.inc
Returns an edit form for custom type settings.
qtip_fetch_instances_field in ./qtip.module
Build a standard instanced form field.
qtip_webform_form_webform_configure_form_alter in modules/qtip_webform/qtip_webform.module
Implements hook_form_FORM_ID_alter().

File

./qtip.module, line 597

Code

function qtip_fetch_instances($required = FALSE, $label = NULL) {
  $qts = qtip_load_multiple();
  if (!$label) {
    $instances[''] = $required ? t('- Select a value -') : t('- Default -');
  }
  else {
    $instances[''] = $label;
  }
  foreach ($qts as $machine_name => $instance) {
    $instances[$machine_name] = $instance->name;
  }
  return $instances;
}