You are here

function radioactivity_rules_rules_action_info in Radioactivity 6

Implementation of hook_rules_action_info().

File

modules/radioactivity_rules/radioactivity_rules.module, line 6

Code

function radioactivity_rules_rules_action_info() {
  $info = array();
  $info['radioactivity_rules_action_load_decay_profile'] = array(
    'label' => t('Load a decay profile'),
    'new variables' => array(
      'decay_profile_loaded' => array(
        'type' => 'decay_profile',
        'label' => t('Decay profile'),
      ),
    ),
    'module' => 'Radioactivity',
  );
  $info['radioactivity_rules_action_evaluate_energy'] = array(
    'label' => t('Set nodes energy to a specific value using a simple algorithm'),
    'arguments' => array(
      'node' => array(
        'type' => 'node',
        'label' => t('Content'),
      ),
      'decay_profile_loaded' => array(
        'type' => 'decay_profile',
        'label' => t('Decay profile'),
      ),
      'algorithm' => array(
        'type' => 'string',
        'label' => t('Algorithm'),
        'description' => t('Supported operators are + - * and /. Functions sqrt(), pow(), sin() and cos().'),
      ),
    ),
    'module' => 'Radioactivity',
  );
  return $info;
}