function block_class_install in Block Class 7.2
Same name and namespace in other branches
- 5 block_class.install \block_class_install()
- 6.2 block_class.install \block_class_install()
- 6 block_class.install \block_class_install()
Implements hook_install().
File
- ./
block_class.install, line 11 - Install, update and uninstall functions for the block_class module.
Code
function block_class_install() {
$schema['block'] = array();
block_class_schema_alter($schema);
foreach ($schema['block']['fields'] as $field => $spec) {
if (db_field_exists('block', $field)) {
watchdog('system', 'Module install: Attempt to recreate field: "%field", when it already exists.', array(
'%field' => $field,
), WATCHDOG_WARNING);
}
else {
db_add_field('block', $field, $spec);
}
}
}