- public function execute($entity = NULL) {
- // We need to change at least one value, otherwise the changed timestamp
- // will not be updated.
- $entity->changed = 0;
- $entity->save();
+ public function execute(MediaInterface $entity = NULL) {
+ if ($entity) {
+ // We need to change at least one value, otherwise the changed timestamp
+ // will not be updated.
+ $entity->setChangedTime(0)->save();
+ }