You are here

public function PartyDefaultDataSet::display in Party 7

Same name and namespace in other branches
  1. 8.2 includes/party.data.inc \PartyDefaultDataSet::display()

Return the renderable array for one of our attached entities.

Parameters

int $delta: The delta of the entity to render.

$view_mode: (optional) The view mode to use. Defaults to that set in the data set definition.

Return value

A renderable array.

File

includes/party.data.inc, line 511
Provides the default class for managing party - Attached entity relationships.

Class

PartyDefaultDataSet
Class PartyDefaultDataSet

Code

public function display($delta, $view_mode = NULL) {
  $entity = $this
    ->getEntity($delta);
  if (!isset($view_mode)) {
    $party_data_info = party_get_data_set_info($this->data_set);
    $view_mode = $party_data_info['view mode'];
  }
  return entity_view($this
    ->getDataInfo('entity type'), array(
    $entity,
  ), $view_mode);
}