onlyone.install in Allow a content type only once (Only One) 7
Same filename and directory in other branches
Install and uninstall functions for the Only One module.
File
onlyone.installView source
<?php
/**
* @file
* Install and uninstall functions for the Only One module.
*/
/**
* Implements hook_install().
*/
function onlyone_install() {
// Creating the default values for the module's variables.
variable_set('onlyone_node_types', array());
variable_set('onlyone_new_menu_entry', FALSE);
}
/**
* Implements hook_uninstall().
*/
function onlyone_uninstall() {
// Deleting the module's variables.
variable_del('onlyone_node_types');
variable_del('onlyone_new_menu_entry');
}
Functions
Name | Description |
---|---|
onlyone_install | Implements hook_install(). |
onlyone_uninstall | Implements hook_uninstall(). |