<?php declare(strict_types=1);
/*
- * This file is part of the Rapsys PackBundle package.
+ * This file is part of the Rapsys UserBundle package.
*
* (c) Raphaël Gertz <symfony@rapsys.eu>
*
* @param string $title The group name
*/
public function __construct(string $title) {
+ //Set defaults
$this->title = $title;
+ $this->created = new \DateTime('now');
+ $this->updated = new \DateTime('now');
$this->users = new ArrayCollection();
}
* @return string
*/
public function getRole(): string {
+ //XXX: $prefix = 'ROLE_' set in Role*Voter classes
return 'ROLE_'.strtoupper($this->title);
}
}