]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Entity/Group.php
Rename user bundle alias
[userbundle] / Entity / Group.php
index c97515c1f36f1e3ad260136508df93dc87f42cb0..aa60f77e0f9e48c3a77a1a42f6aa154b53e89806 100644 (file)
@@ -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);
        }
 }