->
fields('t'
) ->
condition('entity_id',
$row['entity_id'
]) ->
condition('deleted', 1
) ->
orderBy('delta'
);
foreach ($item_query->
execute() as $item_row) { if (!
isset($entities[$item_row['revision_id'
]])) { // Create entity with the right revision id and entity id combination.
$item_row['entity_type'
] =
$this->entityTypeId;
// @todo: Replace this by an entity object created via an entity
// factory, see https://www.drupal.org/node/1867228.
$entities[$item_row['revision_id'
]] =
_field_create_entity_from_ids((object) $item_row);
} $item =
[];
foreach ($column_map as $db_column =>
$field_column) { $item[$field_column] =
$item_row[$db_column];
} $items_by_entity[$item_row['revision_id'
]][] =
$item;
} } // Create field item objects and return.
foreach ($items_by_entity as $revision_id =>
$values) {