public function createPlatformRoleAction($translationKey) { $role = new Role(); $role->setType($translationKey); $role->setName('ROLE_' . strtoupper($translationKey)); $role->setTranslationKey($translationKey); $role->setReadOnly(false); $role->setType(Role::PLATFORM_ROLE); $this->om->persist($role); $this->om->flush(); $this->container->get('claroline.manager.profile_property_manager')->addDefaultProperties(); return $role; }