You are here

exposed_filter_data.api.php in Exposed Filter Data 8

Describes methods to alter exposed filter data.

File

exposed_filter_data.api.php
View source
<?php

/**
 * @file
 * Describes methods to alter exposed filter data.
 */

/**
 * Perform alterations on the URL parameters.
 *
 * @param array $params
 *   An array of URL parameters.
 */
function hook_exposed_filter_data_params_alter(&$params) {
  foreach ($params as $filter => $value) {
    if ($filter == 'status') {
      if ($value == 1) {
        $params['Status'] = 'Published';
      }
      elseif ($value == 2) {
        $params['Status'] = 'Not Published';
      }
      unset($params[$filter]);
    }
  }
}

Functions

Namesort descending Description
hook_exposed_filter_data_params_alter Perform alterations on the URL parameters.