• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List
  • File Members

plugins/views_plugin_query.inc

Go to the documentation of this file.
00001 <?php
00010 class views_plugin_query extends views_plugin {
00014   var $pager = NULL;
00015 
00019   function init($base_table, $base_field, $options) {
00020     $this->base_table = $base_table;
00021     $this->base_field = $base_field;
00022     $this->unpack_options($this->options, $options);
00023   }
00024 
00032   function query($get_count = FALSE) { }
00033 
00040   function alter(&$view) {  }
00041 
00048   function build(&$view) { }
00049 
00062   function execute(&$view) {  }
00063 
00073   function add_signature(&$view) { }
00074 
00080   function get_aggregation_info() { }
00081 
00085   function options_form(&$form, &$form_state) {
00086     parent::options_form($form, $form_state);
00087   }
00088 
00089   function options_validate(&$form, &$form_state) { }
00090 
00091   function options_submit(&$form, &$form_state) { }
00092 
00093   function summary_title() {
00094     return t('Settings');
00095   }
00096 
00100   function set_limit($limit) {
00101     $this->limit = $limit;
00102   }
00103 
00107   function set_offset($offset) {
00108     $this->offset = $offset;
00109   }
00110 
00114   function render_pager($exposed_input) {
00115     if (!empty($this->pager) && $this->pager->use_pager()) {
00116       return $this->pager->render($exposed_input);
00117     }
00118 
00119     return '';
00120   }
00121 
00136   function set_where_group($type = 'AND', $group = NULL, $where = 'where') {
00137     // Set an alias.
00138     $groups = &$this->$where;
00139 
00140     if (!isset($group)) {
00141       $group = empty($groups) ? 1 : max(array_keys($groups)) + 1;
00142     }
00143 
00144     // Create an empty group
00145     if (empty($groups[$group])) {
00146       $groups[$group] = array('conditions' => array(), 'args' => array());
00147     }
00148 
00149     $groups[$group]['type'] = strtoupper($type);
00150     return $group;
00151   }
00152 
00159   function set_group_operator($type = 'AND') {
00160     $this->group_operator = strtoupper($type);
00161   }
00162 
00166   function get_result_entities($results, $relationship = NULL) {
00167     return FALSE;
00168   }
00169 }

Generated on Sun Feb 26 2012 12:52:52 for Views by  doxygen 1.7.1