function _views_prepare_handler in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 includes/handlers.inc \_views_prepare_handler()
- 7.3 includes/handlers.inc \_views_prepare_handler()
Prepare a handler's data by checking defaults and such.
1 call to _views_prepare_handler()
- views_get_handler in ./
views.module - Fetch a handler from the data cache.
File
- includes/
handlers.inc, line 86 - handlers.inc Defines the various handler objects to help build and display views.
Code
function _views_prepare_handler($definition, $data, $field) {
foreach (array(
'group',
'title',
'title short',
'help',
'real field',
) as $key) {
if (!isset($definition[$key])) {
// First check the field level
if (!empty($data[$field][$key])) {
$definition[$key] = $data[$field][$key];
}
else {
if (!empty($data['table'][$key])) {
$definition[$key] = $data['table'][$key];
}
}
}
}
return _views_create_handler($definition);
}