This module provides an API to simplify the usage of Drupal's built-in Tabledrag functionality, like that used in the "Manage Fields" administration panel in Drupal.
Context Easy provides a hook to create easily simple custom Context conditions and reactions.
Normally creating custom conditions and reactions involves implementing hook_context_plugins() and hook_context_registry(), writing condition and reaction plugin classes and add in Drupal integration points.
With Context Easy you just need to implement hook_context_easy() and everything else will be automatically done for you.
Example
The following example would provide one condition and one reaction:
<?php
/**
* Implements hook_context_easy().
*
* @return
* An array of Context conditions and reactions.
* The corresponding array value is an associative array that may contain the
* following key-value pairs:
* - "title": Required. The untranslated title of the condition/reaction.
* - "description": The untranslated description of the condition/reaction.
* - "type": Required. It must be either "conditon" or "reaction"
* - "function": Required. The function to call. If type is "condition", the
* function should return TRUE for an active context or FALSE for an
* inactive Context.
*/
function YOURMODULE_context_easy() {
$contexts['randomize'] = array(
'type' => 'condition',
'title' => 'Random',