コード例 #1
0
ファイル: User.php プロジェクト: spirit-dev/dbox-user
 /**
  * User constructor.
  */
 public function __construct()
 {
     // Construct parent
     parent::__construct();
     // Set communications as an array
     $this->viewedCommunications = new ArrayCollection();
     // Set default user role
     if (empty($this->roles)) {
         $this->roles = Globals::getDefaultRoles();
     }
     // Set dafault user language
     if (empty($this->language)) {
         $this->language = Globals::getDefaultLanguage();
     }
 }