You are here

function title_field_replacement_is_label in Title 7

Checks whether the given field name is a replaced entity label.

Parameters

$entity_type: The name of the entity type.

$field_name: The replacing field name.

Return value

TRUE id the give field is replacing the entity label, FALSE otherwise.

1 call to title_field_replacement_is_label()
title_form_field_ui_field_edit_form_alter in ./title.module
Implements hook_form_FORM_ID_alter().

File

./title.module, line 836

Code

function title_field_replacement_is_label($entity_type, $field_name) {
  $label = FALSE;
  $legacy_field = title_field_replacement_get_legacy_field($entity_type, $field_name);
  if ($legacy_field) {
    $info = entity_get_info($entity_type);
    $label = $legacy_field == $info['entity keys']['label'];
  }
  return $label;
}