You are here

class field_collection_views_handler_field_field_path in Field Collection Views 8

Same name and namespace in other branches
  1. 7 views/field_collection_views_handler_field_field_path.inc \field_collection_views_handler_field_field_path

Field handler to display the host_entity_path

Hierarchy

Expanded class hierarchy of field_collection_views_handler_field_field_path

1 string reference to 'field_collection_views_handler_field_field_path'
field_collection_views_views_data in views/field_collection_views.views.inc
Implements hook_views_data()

File

views/field_collection_views_handler_field_field_path.inc, line 10
Contains the host_entity_path field handler.

View source
class field_collection_views_handler_field_field_path extends views_handler_field {
  function query() {

    // Do nothing, as this handler does not need to do anything to the query itself.
  }
  function option_definition() {
    $options = parent::option_definition();
    return $options;
  }
  function options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);
  }

  /**
   * Work out the field_path
   */
  function render($values) {
    $field_path = "";
    $item_id = $values->item_id;

    //debug($values);
    $field_collection_item = field_collection_item_load($item_id);
    $field_path = field_collection_field_get_path($field_collection_item
      ->fieldInfo());
    return $field_path;
  }

}

Members