function flag_entity::get_views_info in Flag 7.3
Same name and namespace in other branches
- 7.2 flag.inc \flag_entity::get_views_info()
Returns information for the Views integration.
Overrides flag_flag::get_views_info
1 call to flag_entity::get_views_info()
- flag_user::get_views_info in includes/
flag/ flag_user.inc - Returns information for the Views integration.
1 method overrides flag_entity::get_views_info()
- flag_user::get_views_info in includes/
flag/ flag_user.inc - Returns information for the Views integration.
File
- includes/
flag/ flag_entity.inc, line 263 - Contains the flag_entity class.
Class
- flag_entity
- Base entity flag handler.
Code
function get_views_info() {
$entity_info = entity_get_info($this->entity_type);
if (!isset($entity_info['base table'])) {
return NULL;
}
return array(
'views table' => $entity_info['base table'],
'join field' => $entity_info['entity keys']['id'],
'title field' => isset($entity_info['entity keys']['label']) ? $entity_info['entity keys']['label'] : '',
'title' => t('@entity_label flag', array(
'@entity_label' => $entity_info['label'],
)),
'help' => t('Limit results to only those entity flagged by a certain flag; Or display information about the flag set on a entity.'),
'counter title' => t('@entity_label flag counter', array(
'@entity_label' => $entity_info['label'],
)),
'counter help' => t('Include this to gain access to the flag counter field.'),
);
}