function entity_translation_handler_filter_translation_exists::get_entity_type_filters in Entity Translation 7
Get all available entity type filters that can be used to build the query.
1 call to entity_translation_handler_filter_translation_exists::get_entity_type_filters()
- 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 72 - 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_entity_type_filters() {
// We need to build the query to know about the available fields.
$this->view
->build();
$filters = array();
foreach ($this->view->filter as $key => $filter) {
// Break if we encounter our filter, the filter must be before this one.
if ($filter == $this) {
break;
}
if ($filter instanceof entity_translation_handler_filter_entity_type && count($filter->value) == 1 && empty($filter->options['expose']['multiple'])) {
$filters[$key] = $filter->value_title;
}
}
return $filters;
}