You are here

function synonyms_settings_overview in Synonyms 7

Page menu callback for managing Synonyms settings of entity types.

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

File

./synonyms.pages.inc, line 430
Menu page callbacks of Synonyms module.

Code

function synonyms_settings_overview() {
  $output = array();
  $output['table'] = array(
    '#theme' => 'table',
    '#header' => array(
      t('Entity type'),
      t('Bundle'),
      t('Manage'),
    ),
    '#rows' => array(),
  );
  foreach (entity_get_info() as $entity_type => $entity_info) {
    if (synonyms_entity_type_load($entity_type)) {
      foreach ($entity_info['bundles'] as $bundle => $bundle_info) {
        $output['table']['#rows'][] = array(
          $entity_info['label'],
          $bundle == $entity_type ? '' : $bundle_info['label'],
          l(t('Edit'), 'admin/structure/synonyms/' . $entity_type . '/' . $bundle),
        );
      }
    }
  }
  return $output;
}