public ContentEntityForm::updateChangedTime(EntityInterface $entity)
Updates the changed time of the entity.
Applies only if the entity implements the EntityChangedInterface.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity updated with the submitted values.
File
- core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 284
Class
- ContentEntityForm
- Entity form variant for content entity types.
Namespace
Drupal\Core\Entity
Code
public function updateChangedTime(EntityInterface $entity) { if ($entity->getEntityType()->isSubclassOf(EntityChangedInterface::class)) { $entity->setChangedTime(REQUEST_TIME); } }
Please login to continue.