You are here

function finder_alias in Finder 7

Same name and namespace in other branches
  1. 6 finder.module \finder_alias()
  2. 7.2 includes/build.inc \finder_alias()

Build aliases in consistent manner.

Only the $type and $feid are required, but you can supply as many params as is needed, as long as your usage is consistent between places where it needs to be.

Parameters

$type: The type of alias ('table', or 'field').

$feid: The finder element id.

$table: The raw table name.

$field: The raw field name.

$delta: A meaningful extra value.

2 calls to finder_alias()
finder_field_alias in ./finder.module
Build field alias in consistent manner.
finder_table_alias in ./finder.module
Build table alias in consistent manner.

File

./finder.module, line 1708
The finder module.

Code

function finder_alias($type, $feid, $table = NULL, $field = NULL, $delta = NULL) {
  static $aliases = array();
  static $alias_count = 0;
  $alias =& $aliases[$type][$feid][$table][$field][$delta];
  if (empty($alias)) {
    $alias = ++$alias_count;
  }
  return 'finder_' . $type . '_' . $alias;
}