You are here

function _draggableviews_init_handler in DraggableViews 7

Same name and namespace in other branches
  1. 6.3 draggableviews.inc \_draggableviews_init_handler()

Get Handler Instance

Parameters

$field: The field options specified in the style plugin.

$view: The view object.

Return value

A handler instance.

1 call to _draggableviews_init_handler()
_draggableviews_info in ./draggableviews.inc
Fetch views-style-plugin information. Collect all known information in a handy array.

File

./draggableviews.inc, line 1037
Draggableviews processing functions. Rough summary of what functions in this file do:

Code

function _draggableviews_init_handler($field, &$view) {
  if (isset($field['handler'])) {
    $handler_info = draggableviews_discover_handlers($field['handler']);
    $file = $handler_info['path'] . '/' . $handler_info['file'];
    if ($handler_info['path'] && $handler_info['file'] && file_exists($file)) {
      module_load_include('inc', 'draggableviews', 'implementations/draggableviews_handler');
      require_once DRUPAL_ROOT . '/' . $file;
      $handler = new $handler_info['handler']();
      $handler
        ->init($field['field'], $view);
      return $handler;
    }
    else {
      return FALSE;
    }
  }
  else {
    return FALSE;
  }
}