X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/0929c559670ac8d386a047789712e6164a640326..9130dcd45d4201c7302883b6da347945c3655fc6:/Entity/Group.php diff --git a/Entity/Group.php b/Entity/Group.php index c97515c..aa60f77 100644 --- a/Entity/Group.php +++ b/Entity/Group.php @@ -169,7 +169,7 @@ class Group { */ 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')); } @@ -190,6 +190,7 @@ class Group { * @return string */ public function getRole(): string { + //XXX: $prefix = 'ROLE_' set in Role*Voter classes return 'ROLE_'.strtoupper($this->title); } }