date_repeat_entity.install in Date Repeat Entity 7
Same filename and directory in other branches
Install, update and uninstall functions for the Date Repeat Entity module.
File
date_repeat_entity.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Date Repeat Entity module.
*/
/**
* Implements hook_install().
*/
function date_repeat_entity_install() {
// Ensure that our hooks get called after UUID module hooks because we
// depend on UUIDs being in place. UUID is a dependency of this model so
// it should always be installed before this one its weight should be
// available to the db_select query below.
// Get weight of UUID module from system table.
$weight = db_select('system', 's')
->fields('s', array(
'weight',
))
->condition('name', 'uuid', '=')
->execute()
->fetchField();
// Give our module a heavier weight value.
db_update('system')
->fields(array(
'weight' => $weight + 1,
))
->condition('name', 'date_repeat_entity', '=')
->execute();
}
Functions
Name![]() |
Description |
---|---|
date_repeat_entity_install | Implements hook_install(). |