function rules_admin_get_argument_labels in Rules 6
Gets the labels of the variables, which are configured to be passed as arguments to the given element.
1 call to rules_admin_get_argument_labels()
- _rules_admin_get_label in rules_admin/
rules_admin.inc - Gets the label for the info of the given element by apply label callbacks. Note that this is also used for argument infos.
File
- rules_admin/
rules_admin.inc, line 258
Code
function rules_admin_get_argument_labels($proxy, $element, $prefix = '@') {
$labels = array();
$names = rules_get_mapped_argument_names($element);
$vars = $proxy
->get_available_variables($element['#id']);
$labels = array();
foreach ($names as $argument_name => $variable_name) {
if (isset($vars[$variable_name]['label'])) {
$labels[$prefix . $argument_name] = $vars[$variable_name]['label'];
}
}
return $labels;
}