function rules_data_action_data_create_options

Options list callback for data create action.

Related topics

1 call to rules_data_action_data_create_options()
rules_data_action_info in modules/data.rules.inc
Implements hook_rules_action_info() on behalf of the pseudo data module.
1 string reference to 'rules_data_action_data_create_options'
rules_data_action_info in modules/data.rules.inc
Implements hook_rules_action_info() on behalf of the pseudo data module.

File

modules/data.rules.inc, line 467

Code

function rules_data_action_data_create_options() {
    $cache = rules_get_cache();
    $data_info = $cache['data_info'];
    $entity_info = entity_get_info();
    // Remove entities.
    $data_info = array_diff_key($data_info, $entity_info);
    $options = array();
    foreach ($data_info as $type => $properties) {
        if (isset($properties['creation callback'])) {
            // Add data types with creation callback only.
            $options[$type] = $properties['label'];
        }
    }
    natcasesort($options);
    return $options;
}