You are here

function field_collection_views_handler_field_host_entity_id::render in Field Collection Views 7

Same name and namespace in other branches
  1. 8 views/field_collection_views_handler_field_host_entity_id.inc \field_collection_views_handler_field_host_entity_id::render()

Work out the host_entity_id

Overrides views_handler_field::render

File

views/field_collection_views_handler_field_host_entity_id.inc, line 27
Contains the host_entity_id field handler.

Class

field_collection_views_handler_field_host_entity_id
Field handler to display the host_entity_id

Code

function render($values) {
  $host_entity_id = 0;

  //$item_id =  $this->get_value($values, 'item_id');
  $item_id = $values->item_id;

  //debug($values);
  $field_collection_item = field_collection_item_load($item_id);
  $host_entity_id = $field_collection_item
    ->hostEntityId();
  return $host_entity_id;
}