You are here

function theme_cer_label in Corresponding Entity References 7.2

Same name and namespace in other branches
  1. 7 cer.module \theme_cer_label()
1 theme call to theme_cer_label()
cer_settings_form in ./cer.admin.inc
The settings form.

File

./cer.module, line 108
Main module file.

Code

function theme_cer_label($variables) {
  $key = explode(' ', $variables['key']);
  $local = field_info_instance($key[0], $key[2], $key[1]);
  $remote = field_info_instance($key[3], $key[5], $key[4]);
  $message = 'Correspond <span title="!local_field">%local_label</span> on !local_entity(s) of type %local_bundle with <span title="!remote_field">%remote_label</span> on !remote_entity(s) of type %remote_bundle.';
  $variables = array(
    '%local_label' => $local['label'],
    '!local_field' => $local['field_name'],
    '!local_entity' => $local['entity_type'],
    '%local_bundle' => $local['bundle'],
    '%remote_label' => $remote['label'],
    '!remote_field' => $remote['field_name'],
    '!remote_entity' => $remote['entity_type'],
    '%remote_bundle' => $remote['bundle'],
  );
  return t($message, $variables);
}