You are here

class views_plugin_row_sgrid_style in Sortable Grid Views Plugin 6

Same name and namespace in other branches
  1. 7 views_plugin_row_sgrid_style.inc \views_plugin_row_sgrid_style

The basic 'fields' row plugin

This displays fields one after another, giving options for inline or not.

Hierarchy

Expanded class hierarchy of views_plugin_row_sgrid_style

1 string reference to 'views_plugin_row_sgrid_style'
sgrid_views_plugins in ./sgrid.views.inc
@file sgrid.views.inc Views include file for Sortable Grid module

File

./views_plugin_row_sgrid_style.inc, line 18
views_plugin_row_sgrid_style.inc Views row style plugin for Sortable grid module

View source
class views_plugin_row_sgrid_style extends views_plugin_row {

  // We need to override this to fetch the nid
  function query() {
    if (isset($this->base_table)) {
      if (isset($this->options['relationship']) && isset($this->view->relationship[$this->options['relationship']])) {
        $relationship = $this->view->relationship[$this->options['relationship']];
        $this->field_alias = $this->view->query
          ->add_field($relationship->alias, $this->base_field);
      }
      else {
        $this->field_alias = $this->view->query
          ->add_field($this->base_table, $this->base_field);
      }
    }

    // This will be used to store the rank associated to the node for this view
    $this->view->query
      ->add_field('node', 'nid');
  }

}

Members