finder_condition_args

  1. finder
    1. 7.x-1.x
Versions
7.x-1.x finder_condition_args($field = NULL, $value = NULL, $match = NULL)

Get data about finder match methods.

Parameters

$field The field to match.

$value The value to match.

$match The match method according to finder's settings.

Return value

An object cast from an array with keys field/value/match if $match is set. Otherwise returns the full array of data about all match methods including operators and descriptions.

▾ 5 functions call finder_condition_args()

finder_admin_element_edit in includes/finder.admin.inc
Admin finder element add/edit page. Must have a Finder object at this point.
finder_autocomplete_form_finder_admin_element_edit_alter in modules/finder_autocomplete/finder_autocomplete.module
Implements hook_form_FORM_ID_alter().
finder_find_choices in ./finder.module
Postprocessing for returned finder_find options when mode is choices.
finder_find_query in ./finder.module
Build basic finder query arrays.
finder_views_plugin_display_finder::query in modules/finder_views/includes/finder_views_plugin_display_finder.inc

Code

./finder.module, line 1220

<?php
function finder_condition_args($field = NULL, $value = NULL, $match = NULL) {
  static $operators;
  if (empty($operators)) {
    // Operators use abbreviated key names because they need to be tiny in cache ID's.
    $operators = finder_condition_args_default();
    $operators = array_merge($operators, variable_get('finder_custom_matching', array()));
    drupal_alter('finder_condition_args', $operators);
  }
  if (!is_null($match)) {
    if ($operators[$match]['value_prefix']) {
      $value = $operators[$match]['value_prefix'] . $value;
    }
    if ($operators[$match]['value_suffix']) {
      $value = $value . $operators[$match]['value_suffix'];
    }
    return (object) array('field' => $field, 'value' => $value, 'match' => $operators[$match]['operator']);
  }
  return $operators;
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.