private function getAllMappedPermissions(): array
    {
        $mappedPermissions = [];
        foreach (Craft::$app->userPermissions->getAllPermissions() as $permissions) {
            $mappedPermissions = array_merge($mappedPermissions, $this->getMappedPermissions($permissions));
        }

        return $mappedPermissions;
    }
private function getAllMappedPermissions(): array
    {
        $mappedPermissions = [];
        foreach (Craft::$app->userPermissions->getAllPermissions() as $permissions) {
            $mappedPermissions = array_merge($mappedPermissions, $this->getMappedPermissions($permissions));
        }

        return $mappedPermissions;
    }
private function getAllMappedPermissions ( ) : array { $ mappedPermissions = [ ] ; foreach ( Craft :: $ app -> userPermissions -> getAllPermissions ( ) as $ permissions ) { $ mappedPermissions = array_merge ( $ mappedPermissions , $ this -> getMappedPermissions ( $ permissions ) ) ; } return $ mappedPermissions ; }
Get a mapping of all permissions from lowercase to camelcase
savePermissions only accepts camelcase.

@return array
Get a mapping of all permissions from lowercase to camelcase savePermissions only accepts camelcase .