You are here

function synonyms_settings_title in Synonyms 7

Menu title callback function for synonyms settings page.

Parameters

string $entity_type: Entity type whose synonyms settings are managed

string $bundle: Bundle whose synonyms settings are managed

Return value

string Title of the synonyms settings page

1 string reference to 'synonyms_settings_title'
synonyms_menu in ./synonyms.module
Implements hook_menu().

File

./synonyms.module, line 1497
Provide synonyms feature for Drupal entities.

Code

function synonyms_settings_title($entity_type, $bundle) {
  $entity_info = entity_get_info($entity_type);
  $entity_label = isset($entity_info['plural label']) ? $entity_info['plural label'] : $entity_info['label'];
  if ($entity_type == $bundle) {
    return t('Synonyms settings of @entity_type', array(
      '@entity_type' => $entity_label,
    ));
  }
  return t('Synonyms settings of @bundle @entity_type', array(
    '@bundle' => $entity_info['bundles'][$bundle]['label'],
    '@entity_type' => $entity_label,
  ));
}