You are here

function views_view_add_field in Views (for Drupal 7) 5

Add field info to a view.

File

./views.module, line 1190

Code

function views_view_add_field(&$view, $table, $field, $label, $sortable = FALSE, $default_sort = 0, $handler = '') {
  $view->field[] = array(
    'tablename' => $table,
    'field' => $field,
    'label' => $label,
    'sortable' => $sortable,
    'defaultsort' => $default_sort,
    'handler' => $handler,
  );
}