You are here

function hook_environment_workflow in Environment 7

Same name and namespace in other branches
  1. 6 environment.api.php \hook_environment_workflow()

Define qualities about a given environment workflow.

Environment workflows might also be thought of as environment namespaces. A given site might have a number of different environment contexts. The default workflow is NULL, and represents a straightforward site deployment workflow.

In the example for hook_environmnet, a pair of states are created for a 'public' workflow which is intended to be used to indicate whether the site is actually live, as opposed to in a state for internal testing.

Other workflows that may be useful could include the current state of functional development vs. front-end design, or administrative review stages of the site as a software project.

Return value

array Array of workflows indexed on machine name. Supported elements include:

  • label: The human-readable name for the workflow.
  • description: Extended description of the workflow.
1 function implements hook_environment_workflow()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

environment_environment_workflow in ./environment.module
Implements hook_environment_workflow().
1 invocation of hook_environment_workflow()
environment_load_workflow in ./environment.module
Get the current assortment of Workflows.

File

./environment.api.php, line 135
Hooks provided by Environment.

Code

function hook_environment_workflow() {
  $workflows = array();
  $workflows['public'] = array(
    'label' => t('Publicly accessible'),
  );
  $workflows['design'] = array(
    'label' => t('Design status'),
    'description' => t('Set the current status of design/front-end work for the site.'),
  );
  $workflows['review'] = array(
    'label' => t('Administrative review'),
  );
  return $workflows;
}