Field::getNewest()

Version 3.9

Get the newest comment

Return value

Object Comment

Full documentation

Show create date and creator on last comment:

$Comment = $Order->comments->getNewest();
$txt = "Last comment: {$Comment->getCreatedDate()} by {$Comment->getCreator()->getName()}";

Comment methods

Method Return Descrition
getId() int Comment id.
getText() string Comment text.
getCreatedDate() Date Comment created -date.
getModifiedDate() Date Comment modified -date.
getCreator() User Comment creator.