function rules_rules_core_data_info_alter

Implements hook_rules_data_info_alter() on behalf of the pseudo rules_core module.

Makes sure there is a list<type> data type for each type registered.

See also

rules_rules_data_info_alter()

Related topics

1 call to rules_rules_core_data_info_alter()
rules_rules_data_info_alter in ./rules.rules.inc
Implements hook_rules_data_info_alter().

File

modules/rules_core.rules.inc, line 166

Code

function rules_rules_core_data_info_alter(&$data_info) {
    foreach ($data_info as $type => $info) {
        if (!entity_property_list_extract_type($type)) {
            $list_type = "list<{$type}>";
            if (!isset($data_info[$list_type])) {
                $data_info[$list_type] = array(
                    'label' => t('list of @type_label items', array(
                        '@type_label' => $info['label'],
                    )),
                    'wrap' => TRUE,
                    'group' => t('List', array(), array(
                        'context' => 'data_types',
                    )),
                );
                if (isset($info['parent']) && $info['parent'] == 'entity') {
                    $data_info[$list_type]['ui class'] = 'RulesDataUIListEntity';
                }
            }
        }
    }
}