function _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 75

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];
            }
            elseif (!empty($data['table'][$key])) {
                $definition[$key] = $data['table'][$key];
            }
        }
    }
    return _views_create_handler($definition, 'handler', $type);
}