You are here

function flag_entity::get_views_info in Flag 7.2

Same name and namespace in other branches
  1. 7.3 includes/flag/flag_entity.inc \flag_entity::get_views_info()

Returns information for the Views integration.

1 call to flag_entity::get_views_info()
flag_user::get_views_info in ./flag.inc
Returns information for the Views integration.
1 method overrides flag_entity::get_views_info()
flag_user::get_views_info in ./flag.inc
Returns information for the Views integration.

File

./flag.inc, line 1473
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

flag_entity
Base entity flag handler.

Code

function get_views_info() {
  $entity_info = entity_get_info($this->content_type);
  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.'),
  );
}