You are here

function title_field_replacement_get_legacy_field in Title 7

Returns the legacy field replaced by the given field name.

Parameters

$entity_type: The name of the entity type.

$field_name: The replacing field name.

Return value

The replaced legacy field name or FALSE if none available.

1 call to title_field_replacement_get_legacy_field()
title_field_replacement_is_label in ./title.module
Checks whether the given field name is a replaced entity label.

File

./title.module, line 859

Code

function title_field_replacement_get_legacy_field($entity_type, $field_name) {
  $result = FALSE;
  $fr_info = title_field_replacement_info($entity_type);
  if ($fr_info) {
    foreach ($fr_info as $legacy_field => $info) {
      if ($info['field']['field_name'] == $field_name) {
        $result = $legacy_field;
        break;
      }
    }
  }
  return $result;
}