You are here

public function purl_querystring::rewrite in Persistent URL 6

Same name and namespace in other branches
  1. 7 includes/purl_querystring.inc \purl_querystring::rewrite()

Just need to add the value to the front of the path.

Overrides purl_processor::rewrite

File

includes/purl_querystring.inc, line 79

Class

purl_querystring
Querystring processor.

Code

public function rewrite(&$path, &$options, $element) {
  if (!_purl_skip($element, $options)) {
    $qs = array();
    parse_str($options['query'], $qs);
    $qs[$element->value] = $element->id;
    $options['query'] = drupal_query_string_encode($qs);
  }
}