1 views_handler_field_node_revision_link.inc | views_handler_field_node_revision_link::get_revision_entity($values, $op) |
Returns the revision values of a node.
Parameters
object $values: An object containing all retrieved values.
string $op: The operation being performed.
Return value
array: A numerically indexed array containing the current node object and the revision ID for this row.
File
- core/
modules/ node/ views/ views_handler_field_node_revision_link.inc, line 54 - Definition of views_handler_field_node_revision_link.
Class
- views_handler_field_node_revision_link
- Field handler to present a link to a node revision.
Code
function get_revision_entity($values, $op) {
$vid = $this->get_value($values, 'node_vid');
$node = $this->get_value($values);
// Unpublished nodes ignore access control.
$node->status = 1;
// Ensure user has access to perform the operation on this node.
if (!node_access($op, $node)) {
return array($node, NULL);
}
return array($node, $vid);
}