group-8.x-1.x-dev/tests/modules/group_test/src/Hook/EntityHooks.php
tests/modules/group_test/src/Hook/EntityHooks.php
<?php
declare(strict_types=1);
namespace Drupal\group_test\Hook;
use Drupal\Core\Hook\Attribute\Hook;
use Drupal\user\UserInterface;
/**
* Entity hook implementations for Group test.
*/
final class EntityHooks {
/**
* Implements hook_ENTITY_TYPE_update().
*/
#[Hook('user_update')]
public function testUserUpdate(UserInterface $user): void {
if ($user->getChangedTime() == 123456789) {
$user->setChangedTime(530496000)->save();
}
}
}
