function history_attach_timestamp
#lazy_builder callback; attaches the last read timestamp for a node.
Parameters
int $node_id: The node ID for which to attach the last read timestamp.
Return value
array A renderable array containing the last read timestamp.
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\history\HistoryRenderCallback::lazyBuilder() instead.
See also
https://www.drupal.org/node/2966725
1 call to history_attach_timestamp()
- HistoryLegacyTest::testHistoryAttachTimestamp in core/
modules/ history/ tests/ src/ Kernel/ HistoryLegacyTest.php - Tests history_attach_timestamp() deprecation.
File
-
core/
modules/ history/ history.module, line 198
Code
function history_attach_timestamp($node_id) {
@trigger_error('history_attach_timestamp() is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\history\\HistoryRenderCallback::lazyBuilder() instead. See https://www.drupal.org/node/2966725', E_USER_DEPRECATED);
return HistoryRenderCallback::lazyBuilder($node_id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.