Returns the complete taxonomy query var variable
331988
public function getQueryVar()
    {
        $wordpressKey = $this->getWordpressKey();
        $generatedQueryVar = Strata::config("runtime.taxonomy.query_vars.$wordpressKey");
        if (!is_null($generatedQueryVar)) {
            return $generatedQueryVar;
        }

        return $wordpressKey;
    }
755053
private function parseCptQueryVars() {
        if ( isset( $this->query_vars['post_type'] ) ) {
            $queryable = get_post_types( [ 'publicly_queryable' => TRUE ] );
            if (
                ! is_array( $this->query_vars['post_type'] )
                && ! in_array( $this->query_vars['post_type'], $queryable, TRUE )
            ) {
                unset( $this->query_vars['post_type'] );
            } elseif ( is_array( $this->query_vars['post_type'] ) ) {
                $allowed = array_intersect( $this->query_vars['post_type'], $queryable );
                $this->query_vars['post_type'] = $allowed;
            }
        }
    }
333423
public function scopeSearch($query, $searchTerm, $taxonomy = 'major')
    {
        return $query->whereHas('term', function($q) use($searchTerm, $taxonomy) {
            $q->where('name', 'like', '%'. $searchTerm .'%');
        });
    }
1203717
def _get_var_name(self, name, fresh=False):
        
        if name not in self._var_name_mappers:
            self._var_name_mappers[name] = VariableNamer(name)

        if fresh:
            var_name = self._var_name_mappers[name].get_next()
        else:
            var_name = self._var_name_mappers[name].get_current()

        return var_name
125300
function getValueQuery(tagInfo) {
        var query;
        if (tagInfo.token.string === "=") {
            return "";
        }
        // Remove quotation marks in query.
        query = tagInfo.token.string.substr(1, tagInfo.offset - 1);

        // Get the last option to use as a query to support multiple options.
        return query.split(/\s+/).slice(-1)[0];
    }
669037
protected function getQuery()
    {
        // Our final results.
        $finalQueryString = '';

        // Construct query string.
        foreach ($this->query as $key => $value) {
            $finalQueryString .= $key.'='.$value.'&';
        }

        // We have something in the result.
        if (! empty($finalQueryString)) {
            $finalQueryString = rtrim($finalQueryString, '&');
        }

        // We return our results.
        return $finalQueryString;
    }
1097316
public function CurrentTag()
    {
        $tagID = $this->request->getVar('tag');

        if (isset($tagID)) {
            return TaxonomyTerm::get_by_id(TaxonomyTerm::class, (int)$tagID);
        }
    }
623479
public function scopeTerm($query, $term, $taxonomy = 'major')
    {
        return $query->whereHas('term', function($q) use($term, $taxonomy) {
            $q->where('name', $term);
        });
    }
1374273
def querystring(self):
        
        return {key: value for (key, value) in self.qs.items()
                if key.startswith(self.MANAGED_KEYS) or self._get_key_values('filter[')}
313787
def get_vars(self):
    

    # Catch eager execution and assert function overload.
    try:
      if tf.executing_eagerly():
        raise NotImplementedError("For Eager execution - get_vars "
                                  "must be overridden.")
    except AttributeError:
      pass

    done = False
    tried_to_make_params = False
    while not done:
      # Most models in cleverhans use only trainable variables and do not
      # make sure the other collections are updated correctly.
      trainable_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES,
                                         self.scope + "/")
      # When wrapping other code, such as the CIFAR 10 challenge models,
      # we need to make sure we get the batch norm running averages as well
      # as the trainable variables.
      model_vars = tf.get_collection(tf.GraphKeys.MODEL_VARIABLES,
                                     self.scope + "/")
      scope_vars = ordered_union(trainable_vars, model_vars)

      if len(scope_vars) > 0:
        done = True
      else:
        assert not tried_to_make_params
        tried_to_make_params = True
        self.make_params()

    # Make sure no variables have been added or removed
    if hasattr(self, "num_vars"):
      assert self.num_vars == len(scope_vars)
    else:
      self.num_vars = len(scope_vars)

    return scope_vars
146668
public static function factoryFromWpQuery()
    {
        global $wp_query;

        if ((bool)$wp_query->is_tax) {
            $term = get_term_by("slug", $wp_query->query_vars['term'], $wp_query->query_vars['taxonomy']);
            return ModelEntity::factoryFromString($term->taxonomy, $term);
        }

        if ($wp_query->queried_object && get_class($wp_query->queried_object) === "WP_Term") {
            $term = $wp_query->queried_object;
            return ModelEntity::factoryFromString($term->taxonomy, $term);
        }
    }
905913
private function getSuggestedTerms()
    {
        $terms = array_map(
            function (\Magento\Search\Model\Autocomplete\Item $termItem) {
                return $termItem->getTitle();
            },
            $this->termDataProvider->getItems()
        );

        return $terms;
    }
1373774
protected function getVarsForDB()
  {
    if (!$fields = $this->getFields()) {
      return $this->vars;
    }

    return array_intersect_key($this->vars, array_flip($fields));
  }
354753
def query_all():
        '''
        
        '''
        recs = TabPost2Tag.select(
            TabPost2Tag,
            TabTag.kind.alias('tag_kind'),
        ).join(
            TabTag,
            on=(TabPost2Tag.tag_id == TabTag.uid)
        )
        return recs
872748
def _get_category_from_pars_var(template_var, context):
    '''
    
    '''
    cat = template_var.resolve(context)
    if isinstance(cat, basestring):
        cat = Category.objects.get_by_tree_path(cat)
    return cat
982141
private function checkTaxonomy()
    {
        foreach ($this->data['taxonomy'] as $key => $taxonomy) {
            if (empty($taxonomy['options']) || !is_array($taxonomy['options'])) {
                continue;
            }

            foreach ($taxonomy['options'] as $optionKey => $optionValue) {
                if (strpos($optionKey, '/') === false) {
                    continue;
                }

                $this->passed = false;
                $error = Trans::__(
                    'general.phrase.invalid-taxonomy-slug',
                    ['%taxonomy%' => $key, '%option%' => $optionValue]
                );
                $this->app['logger.flash']->error($error);
            }
        }

        return $this->passed;
    }
866086
def vars(self):
        
        # cache _var_params
        if self._var_params is None:
            self._var_params = ParameterSet([var.get_parameter() for var in self._vars])
        return self._var_params