You are here

function entity_translation_handler_filter_translation_exists::get_allowed_types in Entity Translation 7

Get entity types managed by entity translation.

1 call to entity_translation_handler_filter_translation_exists::get_allowed_types()
entity_translation_handler_filter_translation_exists::options_form in views/entity_translation_handler_filter_translation_exists.inc
Add option for setting entity type either directly or through a filter.

File

views/entity_translation_handler_filter_translation_exists.inc, line 91
Contains an entity type filter handler.

Class

entity_translation_handler_filter_translation_exists
This handler determines if a translation exists for a particular translation.

Code

function get_allowed_types() {
  $allowed_types_options = variable_get('entity_translation_entity_types');
  $allowed_types = array();
  $entity_info = entity_get_info();
  foreach ($allowed_types_options as $key => $allowed) {
    if ($allowed) {
      $allowed_types[$key] = $entity_info[$key]['label'];
    }
  }
  return $allowed_types;
}