workflow_access.install in Workflow 8
Workflow access installation.
File
modules/workflow_access/workflow_access.installView source
<?php
/**
* @file
* Workflow access installation.
*/
use Drupal\Core\Database\Database;
/**
* Implements hook_schema().
*/
function workflow_access_schema() {
// The D7-table 'workflow_access' is not used anymore.
// The data is no in table 'config'.
return [];
}
/**
* Force rebuild of node access.
*/
function workflow_access_uninstall() {
node_access_needs_rebuild(TRUE);
}
/**
* Force rebuild of node access.
*/
function workflow_access_update_8001(&$sandbox) {
// Rebuild data.
node_access_needs_rebuild(TRUE);
}
/**
* Remove table workflow_access. All current settings are lost!
*/
function workflow_access_update_8002(&$sandbox) {
// Remove the table. Data is now in config.
$schema = Database::getConnection()
->schema();
$schema
->dropTable('workflow_access');
// Rebuild data.
node_access_needs_rebuild(TRUE);
}
Functions
Name | Description |
---|---|
workflow_access_schema | Implements hook_schema(). |
workflow_access_uninstall | Force rebuild of node access. |
workflow_access_update_8001 | Force rebuild of node access. |
workflow_access_update_8002 | Remove table workflow_access. All current settings are lost! |