Permalink
Browse files

#1251928 Don't deal with configuration entities.

  • Loading branch information...
1 parent 68df0dd commit e1c5f91ed8677945d73d97fb0503c4058900a57e @fago committed Aug 17, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 modules/entity.rules.inc
@@ -273,13 +273,17 @@ function rules_entity_action_type_options($element, $name = NULL) {
/**
* Returns options containing entity types having the given key set in the info.
+ *
+ * Additionally, we exclude all entity types that are marked as configuration.
*/
function rules_entity_type_options($key = NULL) {
$info = entity_get_info();
$types = array();
foreach ($info as $type => $entity_info) {
- if (!isset($key) || entity_type_supports($type, $key)) {
- $types[$type] = $entity_info['label'];
+ if (empty($entity_info['configuration']) && empty($entity_info['exportable'])) {
+ if (!isset($key) || entity_type_supports($type, $key)) {
+ $types[$type] = $entity_info['label'];
+ }
}
}
return $types;

0 comments on commit e1c5f91

Please sign in to comment.