Currently only node entity type is supported for row plugin, which means it is impossible to get full entities response for non-node entities.
By gathering the entity information it is possible to gather the needed ids, and then call entity_load() to load the results.

Comments

shushu’s picture

Status: Active » Needs review
StatusFileSize
new914 bytes

Attached code to support this feature.
Hope it will be accepted as soon as possible.
Comments are welcome.

shushu’s picture

StatusFileSize
new1.08 KB

Another version, since it seems taxonomy terms has a special case.

gigabates’s picture

Issue summary: View changes

If anyone's still interested in this, the base table isn't necessarily the same as the entity type. Taxonomy terms are not the only exception as hook_entity_info() can specify anything as the base table. The correct way to identify the entity type from the base table would be something like this.

foreach (entity_get_info() as $entity_type => $info) {
  if ($info['base_table'] == $view->base_table) {
    $id_key = $info['entity keys']['id'];

    // Collect the needed ids
    $entity_ids = array();
    foreach ($view->result as $row) {
      $entity_ids[] = $row->$id_key;
    }

    // Load all the entities
    $result = entity_load($entity_type, $entity_ids);
    break;
  }
}