function _views_prepare_handler

Same name in other branches
  1. 7.x-3.x 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 108

Code

function _views_prepare_handler($definition, $data, $field, $type) {
    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, 'handler', $type);
}