twitter_bootstrap_modal_block.install in Twitter Bootstrap Modal 7.3
twitter_bootstrap_modal_block.install Installation and update functions for the Twitter Bootstrap Modal block Module
File
twitter_bootstrap_modal_block/twitter_bootstrap_modal_block.installView source
<?php
/**
* @file twitter_bootstrap_modal_block.install
* Installation and update functions for the Twitter Bootstrap
* Modal block Module
*/
/**
* Default settings storage.
*/
function _twitter_bootstrap_modal_block_defaults() {
return array(
'trigger' => '',
'link_type' => 'btn-link',
);
}
/**
* Implementation of hook_install().
* This will create our system variable defaults.
* The benefit is that we do not need to pass defaults
* to variable_get(), which allows centralization of defaults.
*/
function twitter_bootstrap_modal_block_install() {
variable_set('twitter_bootstrap_modal_block_settings', _twitter_bootstrap_modal_block_defaults());
}
/**
* Implementation of hook_uninstall().
* Only clears our variables, so a fresh installation can repopulate them.
*/
function twitter_bootstrap_modal_block_uninstall() {
// Settings.
variable_del('twitter_bootstrap_modal_block_settings');
}
Functions
Name![]() |
Description |
---|---|
twitter_bootstrap_modal_block_install | Implementation of hook_install(). This will create our system variable defaults. The benefit is that we do not need to pass defaults to variable_get(), which allows centralization of defaults. |
twitter_bootstrap_modal_block_uninstall | Implementation of hook_uninstall(). Only clears our variables, so a fresh installation can repopulate them. |
_twitter_bootstrap_modal_block_defaults | Default settings storage. |