*/
public function preUpdate(PreUpdateEventArgs $eventArgs) {
//Check that we have a group instance
- if (($user = $eventArgs->getEntity()) instanceof Group) {
+ if (($user = $eventArgs->getObject()) instanceof Group) {
//Set updated value
$user->setUpdated(new \DateTime('now'));
}
* @return string
*/
public function getRole(): string {
+ //XXX: $prefix = 'ROLE_' set in Role*Voter classes
return 'ROLE_'.strtoupper($this->title);
}
}