You are here

function finder_ui_matches_label in Finder 7.2

Get label for a condition args entry.

Parameters

$match: A matches entry.

$matches: The translated string to replace !matches with.

$keywords: The translated string to replace !keywords with.

Return value

The formatted label.

2 calls to finder_ui_matches_label()
finder_autocomplete_settings in plugins/element_handler/autocomplete.inc
Settings callback.
finder_ui_element in modules/finder_ui/includes/element.inc
Finder UI element.

File

modules/finder_ui/includes/common.inc, line 269
common.inc

Code

function finder_ui_matches_label($match, $matches, $keywords) {
  $output = $match['name'];
  $output .= '<div class="description">';
  $output .= drupal_ucfirst(strtr($match['description'], array(
    '!matches' => $matches,
    '!keywords' => $keywords,
  )));
  if (isset($match['operator']) || isset($match['value_prefix']) || isset($match['value_suffix'])) {
    $output .= '<div><code>' . strtr('field !operator !prefixvalue!suffix', array(
      '!operator' => $match['operator'],
      '!prefix' => $match['value_prefix'],
      '!suffix' => $match['value_suffix'],
    )) . '</code></div>';
  }
  $output .= '</div>';
  return $output;
}