function party_plugin_row_attached_entity::render in Party 8.2
Same name and namespace in other branches
- 7 includes/views/party_plugin_row_attached_entity.inc \party_plugin_row_attached_entity::render()
File
- includes/
views/ party_plugin_row_attached_entity.inc, line 58 - Row style plugin for displaying entities attached to a party. This will produce multiple rows per party, and is mostly intended for views which are filtered to a single party, thus showing a list of all of a party's attached entities.
Class
- party_plugin_row_attached_entity
- Plugin class for displaying party attached entities with entity_view.
Code
function render($result) {
$entity_type = $result->{$this->field_alias_entity_type};
$id = $result->{$this->field_alias_eid};
$entity = $this->entities[$entity_type][$id];
// Dose up the entity with the attaching party id, for our preprocess hook
// party_preprocess_entity() to find.
$party_id = $result->{$this->field_alias_pid};
$entity->party_attaching_party = $party_id;
$content = entity_view($entity_type, array(
$id => $entity,
), 'party');
return drupal_render($content);
}