function _views_query_tag_alter_condition

cis7 views.module _views_query_tag_alter_condition(QueryAlterableInterface $query, &$conditions, $substitutions)
cle7 views.module _views_query_tag_alter_condition(QueryAlterableInterface $query, &$conditions, $substitutions)
elmsmedia7 views.module _views_query_tag_alter_condition(QueryAlterableInterface $query, &$conditions, $substitutions)
icor7 views.module _views_query_tag_alter_condition(QueryAlterableInterface $query, &$conditions, $substitutions)
meedjum_blog7 views.module _views_query_tag_alter_condition(QueryAlterableInterface $query, &$conditions, $substitutions)
mooc7 views.module _views_query_tag_alter_condition(QueryAlterableInterface $query, &$conditions, $substitutions)

Replaces the substitutions recursive foreach condition.

1 call to _views_query_tag_alter_condition()
views_query_views_alter in sites/all/modules/ulmus/views/views.module
Implements hook_query_TAG_alter().

File

sites/all/modules/ulmus/views/views.module, line 2147
Primarily Drupal hooks and global API functions to manipulate views.

Code

function _views_query_tag_alter_condition(QueryAlterableInterface $query, &$conditions, $substitutions) {
  foreach ($conditions as $condition_id => &$condition) {
    if (is_numeric($condition_id)) {
      if (is_string($condition['field'])) {
        $condition['field'] = str_replace(array_keys($substitutions), array_values($substitutions), $condition['field']);
      }
      elseif (is_object($condition['field'])) {
        $sub_conditions = &$condition['field']->conditions();
        _views_query_tag_alter_condition($query, $sub_conditions, $substitutions);
      }
      // $condition['value'] is a subquery so alter the subquery recursive.
      // Therefore take sure to get the metadata of the main query.
      if (is_object($condition['value'])) {
        $subquery = $condition['value'];
        $subquery->addMetaData('views_substitutions', $query->getMetaData('views_substitutions'));
        views_query_views_alter($condition['value']);
      }
      elseif (isset($condition['value'])) {
        $condition['value'] = str_replace(array_keys($substitutions), array_values($substitutions), $condition['value']);
      }
    }
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.