You are here

function taxonomy_entity_index_handler_field_tid::init in Taxonomy Entity Index 7

Init the handler with necessary data.

Parameters

view $view: The $view object this handler is attached to.

array $options: The item from the database; the actual contents of this will vary based upon the type of handler.

Overrides views_handler_field_term_node_tid::init

File

includes/views/handlers/taxonomy_entity_index_handler_field_tid.inc, line 21
Field handler to display all taxonomy terms of an entity.

Class

taxonomy_entity_index_handler_field_tid
@file Field handler to display all taxonomy terms of an entity.

Code

function init(&$view, &$options) {
  parent::init($view, $options);

  // Reset the variables which are set by the parent class.
  unset($this->additional_fields['nid']);
  $this->base_table_info = views_fetch_data($this->table);
  $this->entity_info = entity_get_info($this->base_table_info['table']['entity type']);
  $this->additional_fields['entity_id'] = array(
    'table' => $this->entity_info['base table'],
    'field' => $this->entity_info['entity keys']['id'],
  );
}