2 * Implements hook_entity_info().
4 function {{ machine_name }}_entity_info() {
8 'controller class' => 'NodeController',
9 'base table' => 'node',
10 'revision table' => 'node_revision',
11 'uri callback' => 'node_uri',
13 'translation' => array(
16 'entity keys' => array(
20 'language' => 'language',
22 'bundle keys' => array(
26 'view modes' => array(
28 'label' => t('Full content'),
29 'custom settings' => FALSE,
32 'label' => t('Teaser'),
33 'custom settings' => TRUE,
37 'custom settings' => FALSE,
43 // Search integration is provided by node.module, so search-related
44 // view modes for nodes are defined here and not in search.module.
45 if (module_exists('search')) {
46 $return['node']['view modes'] += array(
47 'search_index' => array(
48 'label' => t('Search index'),
49 'custom settings' => FALSE,
51 'search_result' => array(
52 'label' => t('Search result highlighting input'),
53 'custom settings' => FALSE,
58 // Bundles must provide a human readable name so we can create help and error
59 // messages, and the path to attach Field admin pages to.
60 foreach (node_type_get_names() as $type => $name) {
61 $return['node']['bundles'][$type] = array(
64 'path' => 'admin/structure/types/manage/%node_type',
65 'real path' => 'admin/structure/types/manage/' . str_replace('_', '-', $type),
66 'bundle argument' => 4,
67 'access arguments' => array('administer content types'),