function view::init_query

cis7 view::init_query()
cle7 view::init_query()
elmsmedia7 view::init_query()
icor7 view::init_query()
meedjum_blog7 view::init_query()
mooc7 view::init_query()

Do some common building initialization.

3 calls to view::init_query()
view::build in sites/all/modules/ulmus/views/includes/
Build the query for the view.
view::build_title in sites/all/modules/ulmus/views/includes/
Force the view to build a title.
view::export in sites/all/modules/ulmus/views/includes/
Export a view as PHP code.


sites/all/modules/ulmus/views/includes/, line 886
Provides the view object type and associated methods.


An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.


function init_query() {
  if (!empty($this->query)) {
    $class = get_class($this->query);
    if ($class && $class != 'stdClass') {
      // return if query is already initialized.
      return TRUE;

  // Create and initialize the query object.
  $views_data = views_fetch_data($this->base_table);
  $this->base_field = !empty($views_data['table']['base']['field']) ? $views_data['table']['base']['field'] : '';
  if (!empty($views_data['table']['base']['database'])) {
    $this->base_database = $views_data['table']['base']['database'];

  // Load the options.
  $query_options = $this->display_handler->get_option('query');

  // Create and initialize the query object.
  $plugin = !empty($views_data['table']['base']['query class']) ? $views_data['table']['base']['query class'] : 'views_query';
  $this->query = views_get_plugin('query', $plugin);

  if (empty($this->query)) {
    return FALSE;

  $this->query->init($this->base_table, $this->base_field, $query_options['options']);
  return TRUE;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.