function hook_views_field_tooltip_library_info in Views Field Tooltip 7
Provide information about supported tooltip libraries.
Return value
array Associative array of entries describing each tooltip library:
- key: The machine name of the library.
- name: The human name of the library
- "help callback": A function that returns a string describing typical settings for the given tooltip library.
- "needs local file": A flag whether the admin settings should prompt for the path of a local JavaScript file for this library.
- attached: Array of JS and CSS with the same format as Form API attribute "#attached".
See also
views_field_tooltip_views_field_tooltip_library_info()
views_field_tooltip__qtip_get_help()
https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.h...
hook_views_field_tooltip_library_info_alter()
1 function implements hook_views_field_tooltip_library_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
1 invocation of hook_views_field_tooltip_library_info()
- views_field_tooltip_get_library_info in ./
views_field_tooltip.module - Return all tooltip library providers.
File
- ./
views_field_tooltip.api.php, line 27 - Describes hooks provided by the Views Field Tooltip module.
Code
function hook_views_field_tooltip_library_info() {
$path = drupal_get_path('module', 'views_field_tooltip');
return array(
'qtip' => array(
'name' => t('qTip'),
'help callback' => 'views_field_tooltip__qtip_get_help',
'needs local file' => TRUE,
'attached' => array(
'js' => array(
$path . '/js/views_field_tooltip.qtip.js' => 'file',
),
),
),
'qtip2' => array(
'name' => t('qTip2'),
'help callback' => 'views_field_tooltip__qtip2_get_help',
'needs local file' => FALSE,
'attached' => array(
'js' => array(
'//cdn.jsdelivr.net/qtip2/2.2.0/jquery.qtip.min.js' => 'external',
$path . '/js/views_field_tooltip.qtip2.js' => 'file',
),
'css' => array(
'//cdn.jsdelivr.net/qtip2/2.2.0/jquery.qtip.min.css' => 'external',
// CSS fixes for iframe tooltips.
'.html .qtip { max-width: none; }
.html .qtip-content { height: 100%; }
' => 'inline',
),
),
),
);
}