function NodeCreated::getNodeDateValue
Same name and namespace in other branches
- 11.x core/modules/node/src/Plugin/views/argument_default/NodeCreated.php \Drupal\node\Plugin\views\argument_default\NodeCreated::getNodeDateValue()
Gets a timestamp value from the passed node.
Parameters
\Drupal\node\NodeInterface $node: The node to get the timestamp value from.
Return value
int A timestamp value from a node field.
Overrides NodeDateArgumentDefaultPluginBase::getNodeDateValue
File
-
core/
modules/ node/ src/ Plugin/ views/ argument_default/ NodeCreated.php, line 21
Class
- NodeCreated
- Provides the created time of the current node as default argument value.
Namespace
Drupal\node\Plugin\views\argument_defaultCode
protected function getNodeDateValue(NodeInterface $node) : int {
return $node->getCreatedTime();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.