public function updateTimeStamps(PersistEvent $event)
{
$entity = $event->getEntity();
if (!$entity instanceof CreateModifyInterface) {
return;
}
$current_time = new \DateTime();
// Force last-modified to be the current time
$entity->setLastModified($current_time);
// If the time created is still null, set it to the current time
if (!$entity->getTimeCreated()) {
$entity->setTimeCreated($current_time);
}
}