You are here

public function PartyDefaultDataSet::display in Party 8.2

Same name and namespace in other branches
  1. 7 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 351
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);
}