history_attach_timestamp($node_id)
#lazy_builder callback; attaches the last read timestamp for a node.
int $node_id: The node ID for which to attach the last read timestamp.
array $element A renderable array containing the last read timestamp.
function history_attach_timestamp($node_id) { $element = []; $element['#attached']['drupalSettings']['history']['lastReadTimestamps'][$node_id] = (int) history_read($node_id); return $element; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!history!history.module/function/history_attach_timestamp/8.1.x