function rules_entity_type_options

Returns options containing entity types having the given key set in the info.

Additionally, we exclude all entity types that are marked as configuration.

Related topics

1 call to rules_entity_type_options()
rules_entity_action_type_options in modules/entity.rules.inc
Options list callback for data actions.

File

modules/entity.rules.inc, line 275

Code

function rules_entity_type_options($key = NULL) {
  $info = entity_get_info();
  $types = array();
  foreach ($info as $type => $entity_info) {
    if (empty($entity_info['configuration']) && empty($entity_info['exportable'])) {
      if (!isset($key) || entity_type_supports($type, $key)) {
        $types[$type] = $entity_info['label'];
      }
    }
  }
  return $types;
}