public function getRowId(ResultRow
$row) { // Here we compute a unique identifier for the row by computing the hash of
// its data. We exclude the current index, since the same row could have a
// different result index depending on the user permissions. We exclude also
// entity data, since serializing entity objects is very expensive. Instead
// we include entity cache tags, which are enough to identify all the
// entities associated with the row.
$row_data =
array_diff_key((array) $row,
array_flip(['index', '_entity', '_relationship_entities'
])) +
$this->
getRowCacheTags($row);
// This ensures that we get a unique identifier taking field handler access
// into account: users having access to different sets of fields will get
// different row identifiers.
$field_ids =
array_keys($this->view->field
);
$row_data +=
array_flip($field_ids);
// Finally we compute a hash of row data and return it as row identifier.
return hash('sha256',
serialize($row_data));
}}