function entity_menu_links_install in Entity menu links 7
Implements hook_install().
File
- ./
entity_menu_links.install, line 9
Code
function entity_menu_links_install() {
$table = 'menu_links_revision';
$schema = drupal_get_schema($table);
db_create_table($table, $schema);
$schema = drupal_get_schema('menu_links');
$fields = $schema['fields'];
if (!db_field_exists('menu_links', 'vid')) {
db_add_field('menu_links', 'vid', $fields['vid']);
}
if (!db_field_exists('menu_links', 'uuid')) {
db_add_field('menu_links', 'uuid', $fields['uuid']);
}
entity_menu_links_install_revisions();
uuid_sync_all();
// Ensure entity menu links runs after i18n and entity_translation.
db_update('system')
->fields(array(
'weight' => 15,
))
->condition('name', 'entity_menu_links')
->execute();
}