123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- <?php
- class views_plugin_query extends views_plugin {
-
- var $pager = NULL;
-
- function init($base_table, $base_field, $options) {
- $this->base_table = $base_table;
- $this->base_field = $base_field;
- $this->unpack_options($this->options, $options);
- }
-
- function query($get_count = FALSE) { }
-
- function alter(&$view) { }
-
- function build(&$view) { }
-
- function execute(&$view) { }
-
- function add_signature(&$view) { }
-
- function get_aggregation_info() { }
-
- function options_form(&$form, &$form_state) {
- parent::options_form($form, $form_state);
- }
- function options_validate(&$form, &$form_state) { }
- function options_submit(&$form, &$form_state) { }
- function summary_title() {
- return t('Settings');
- }
-
- function set_limit($limit) {
- $this->limit = $limit;
- }
-
- function set_offset($offset) {
- $this->offset = $offset;
- }
-
- function render_pager($exposed_input) {
- if (!empty($this->pager) && $this->pager->use_pager()) {
- return $this->pager->render($exposed_input);
- }
- return '';
- }
-
- function set_where_group($type = 'AND', $group = NULL, $where = 'where') {
-
- $groups = &$this->$where;
- if (!isset($group)) {
- $group = empty($groups) ? 1 : max(array_keys($groups)) + 1;
- }
-
- if (empty($groups[$group])) {
- $groups[$group] = array('conditions' => array(), 'args' => array());
- }
- $groups[$group]['type'] = strtoupper($type);
- return $group;
- }
-
- function set_group_operator($type = 'AND') {
- $this->group_operator = strtoupper($type);
- }
-
- function get_result_entities($results, $relationship = NULL) {
- return FALSE;
- }
- }
|