views_plugin_row_sgrid_style.inc in Sortable Grid Views Plugin 6
Same filename and directory in other branches
views_plugin_row_sgrid_style.inc Views row style plugin for Sortable grid module
File
views_plugin_row_sgrid_style.incView source
<?php
// $Id$
/**
* @file views_plugin_row_sgrid_style.inc
* Views row style plugin for Sortable grid module
*/
// module_load_include('inc', 'views', 'plugins/views_plugin_row');
/**
* The basic 'fields' row plugin
*
* This displays fields one after another, giving options for inline
* or not.
*
* @ingroup views_row_plugins
*/
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');
}
}
Classes
Name | Description |
---|---|
views_plugin_row_sgrid_style | The basic 'fields' row plugin |