You are here

function WorkflowFeaturesController::revert in Workflow 7.2

Revert this workflow, either creating the workflow new (if one with the same machine name is not present), or updating the existing workflow.

Parameters

string $module: The name of the feature module whose components should be reverted.

Overrides EntityDefaultFeaturesController::revert

File

./workflow.features.inc, line 209
Provides Features integration for Workflow using the CRUD API.

Class

WorkflowFeaturesController
Default controller handling features integration.

Code

function revert($module = NULL) {

  // Loads defaults from feature code.
  $defaults = workflow_get_defaults($module);
  if (!empty($defaults)) {
    foreach ($defaults as $machine_name => $entity) {
      workflow_revert($defaults, $machine_name);
    }
  }
}