You are here

function title_field_replacement_info in Title 7

Return field replacement specific information.

Parameters

$entity_type: The name of the entity type.

$legacy_field: (Optional) The legacy field name to be replaced.

8 calls to title_field_replacement_info()
TitleTranslationTestCase::setUp in tests/TitleTranslationTestCase.test
Sets up a Drupal site for running functional and integration tests.
title_entity_sync in ./title.module
Synchronize replaced fields with the regular field values.
title_field_attach_form in ./title.module
Implements hook_field_attach_form().
title_field_attach_submit in ./title.module
Implements hook_field_attach_submit().
title_field_replacement_enabled in ./title.module
Check whether field replacement is enabled for the given field.

... See full list

File

./title.module, line 102

Code

function title_field_replacement_info($entity_type, $legacy_field = NULL) {
  $info = entity_get_info($entity_type);
  if (empty($info['field replacement'])) {
    return FALSE;
  }
  if (isset($legacy_field)) {
    return isset($info['field replacement'][$legacy_field]) ? $info['field replacement'][$legacy_field] : FALSE;
  }
  return $info['field replacement'];
}