| 238 |
} |
} |
| 239 |
$ops[] = l(t('clone'), $path .'/clone', array(), drupal_get_destination()); |
$ops[] = l(t('clone'), $path .'/clone', array(), drupal_get_destination()); |
| 240 |
|
|
| 241 |
|
// If the event label is missing, the module providing the event is gone and the |
| 242 |
|
// rule can't be edited. |
| 243 |
|
$event_label = workflow_ng_get_events('labels', $cfg['#event']); |
| 244 |
$rows[] = array( |
$rows[] = array( |
| 245 |
l($cfg['#label'], $path), |
$event_label ? l($cfg['#label'], $path) : check_plain($cfg['#label']), |
| 246 |
check_plain(workflow_ng_get_events('labels', $cfg['#event'])), |
$event_label ? check_plain($event_label) : array('class' => 'error', 'data' => check_plain($cfg['#event'])), |
| 247 |
check_plain($cfg['#module']), |
check_plain($cfg['#module']), |
| 248 |
workflow_ng_ui_configuration_status($cfg), |
workflow_ng_ui_configuration_status($cfg), |
| 249 |
implode(' ', $ops), |
implode(' ', $ops), |
| 250 |
); |
); |
| 251 |
|
if (!$event_label) { |
| 252 |
|
workflow_ng_handle_error_msg(t("%event can't be found. Probably the providing module has been deactivated.", array('%event' => $cfg['#event']))); |
| 253 |
|
} |
| 254 |
} |
} |
| 255 |
} |
} |
| 256 |
|
|
| 719 |
$event = workflow_ng_get_events('all', $form['cfg']['#value']['#event']); |
$event = workflow_ng_get_events('all', $form['cfg']['#value']['#event']); |
| 720 |
_workflow_ng_element_defaults($event); |
_workflow_ng_element_defaults($event); |
| 721 |
//TODO: for d6 remove argument_info |
//TODO: for d6 remove argument_info |
| 722 |
$argument_info = workflow_ng_ui_event_get_argument_info($form['cfg']['#value'], $element); |
$argument_info = workflow_ng_ui_event_get_argument_info($form['cfg']['#value'], $element); |
| 723 |
$info = array('element' => &$element, 'event' => &$event); |
$info = array('element' => &$element, 'event' => &$event); |
| 724 |
|
|
| 725 |
$form['configure'] = $function($element['#settings'], $argument_info, $info); |
$form['configure'] = $function($element['#settings'], $argument_info, $info); |
| 817 |
$argument_info = workflow_ng_ui_event_get_argument_info($form['cfg']['#value'], $element); |
$argument_info = workflow_ng_ui_event_get_argument_info($form['cfg']['#value'], $element); |
| 818 |
|
|
| 819 |
foreach ($element['#arguments'] as $name => $info) { |
foreach ($element['#arguments'] as $name => $info) { |
| 820 |
|
|
| 821 |
$args = workflow_ng_ui_get_possible_arguments($info, $argument_info); |
$args = workflow_ng_ui_get_possible_arguments($info, $argument_info); |
| 822 |
$form['map'][$name] = array( |
$form['map'][$name] = array( |
| 823 |
'#type' => 'select', |
'#type' => 'select', |
| 1247 |
* Gets $argument_info, which contains all available arguments |
* Gets $argument_info, which contains all available arguments |
| 1248 |
* For this we need to get the arguments of the event as well as further arguments that |
* For this we need to get the arguments of the event as well as further arguments that |
| 1249 |
* might be provided by actions of this or preceding configurations |
* might be provided by actions of this or preceding configurations |
| 1250 |
* |
* |
| 1251 |
* @param $cfg The configuration for which to get the argument info |
* @param $cfg The configuration for which to get the argument info |
| 1252 |
* @param $element An optional element, which is currently edited |
* @param $element An optional element, which is currently edited |
| 1253 |
*/ |
*/ |
| 1280 |
|
|
| 1281 |
/* |
/* |
| 1282 |
* Gets all new arguments defined by actions, which are executed until the given |
* Gets all new arguments defined by actions, which are executed until the given |
| 1283 |
* configuration |
* configuration |
| 1284 |
*/ |
*/ |
| 1285 |
function workflow_ng_get_new_arguments(&$elements, &$cfg_name) { |
function workflow_ng_get_new_arguments(&$elements, &$cfg_name) { |
| 1286 |
if (!isset($cfg_name)) { |
if (!isset($cfg_name)) { |