openlayers_views.install in Openlayers 6
Same filename and directory in other branches
This file holds the functions for the installing and enabling of the openlayers_views module.
File
modules/openlayers_views/openlayers_views.installView source
<?php
/**
* @file
* This file holds the functions for the installing
* and enabling of the openlayers_views module.
*
* @ingroup openlayers
*/
/**
* Implementation of hook_uninstall().
*/
function openlayers_views_uninstall() {
// Get module variables
$results = db_query("SELECT v.name FROM {variable} AS v WHERE v.name LIKE '%s%%'", 'openlayers_views_');
// Remove variables
while ($row = db_fetch_array($results)) {
variable_del($row['name']);
}
}
/**
* Implementation of hook_enable().
*/
function openlayers_views_enable() {
// As needed for upgrading to 2.x (while accounting
// for 0.x), we set a variable that can help
// the upgrade function in 2.x understand what needs
// to be done. Note, it is not meant to actually
// maintain the schema version.
variable_set('openlayers_views_schema_version', 6100);
}
/**
* Implementation of hook_update_N().
*
* No need for translation in update function:
* http://drupal.org/node/322731
*/
function openlayers_views_update_6100(&$sandbox) {
// As needed for upgrading to 2.x (while accounting
// for 0.x), we set a variable that can help
// the upgrade function in 2.x understand what needs
// to be done. Note, it is not meant to actually
// maintain the schema version.
variable_set('openlayers_views_schema_version', 6100);
return array(
0 => array(
'success' => TRUE,
'query' => 'Setup for upgrading to 2.x: openlayers_views_schema_version',
),
);
}
Functions
Name![]() |
Description |
---|---|
openlayers_views_enable | Implementation of hook_enable(). |
openlayers_views_uninstall | Implementation of hook_uninstall(). |
openlayers_views_update_6100 | Implementation of hook_update_N(). |