<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] ?: array()) + array("_5e30c4717ced36cff9e93e19a5c5" . "76cc" => base64_decode("aXNfc3R" . "yaW5n"));
use Claromentis\Core\Services;
use Claromentis\People\Service\UserGroupService;





class UserGroup implements PeopleGRENamesProvider
{
    
    
    private static $group_service;
    
    
    
    
    
    
    
    public static function _Init()
    {
        if (self::$group_service === null) {
            self::$group_service = Services::I()->GetGroupService();
        }
    }
    
    
    
    
    
    
    
    
    
    public static function PreCacheGroups($_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        global $g_application;
        self::$group_service->PreCacheGroups($g_application->security, $_c937cc5681e9e01ba9775dbdf25a204b);
    }
    
    
    
    
    
    
    
    
    
    
    
    public static function GetGroupsByUserId($_161fa4c6089ed7645dda77e187f5b1dd, $_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        global $g_application;
        return self::$group_service->GetGroupsByUserId($_161fa4c6089ed7645dda77e187f5b1dd, $g_application->security, $_c937cc5681e9e01ba9775dbdf25a204b);
    }
    
    
    
    
    
    
    
    public static function GetGroupsTreeByUserId($_161fa4c6089ed7645dda77e187f5b1dd, $_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        global $g_application;
        return self::$group_service->GetGroupsTreeByUserId($_161fa4c6089ed7645dda77e187f5b1dd, $g_application->security, $_c937cc5681e9e01ba9775dbdf25a204b);
    }
    
    
    
    
    
    public static function GetAllMembers()
    {
        return self::$group_service->GetAllMembers();
    }
    
    
    
    
    
    public static function GetAllMemberIds()
    {
        return self::$group_service->GetAllMemberIds();
    }
    
    
    
    
    
    
    public static function GetNameById($id)
    {
        return self::$group_service->GetNameById((int) $id);
    }
    
    
    
    
    
    
    
    
    
    
    
    
    public static function CreateGroups($_6839ab32693701af1718dd3c7979a4d8, $_28fd57f750dbb5ffb3ffad3a888358a9 = '')
    {
        return self::$group_service->CreateGroups($_6839ab32693701af1718dd3c7979a4d8, $_28fd57f750dbb5ffb3ffad3a888358a9);
    }
    
    
    
    
    
    
    
    
    
    
    
    
    public static function GetGroupsList($_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        if ($_c937cc5681e9e01ba9775dbdf25a204b === true) {
            global $g_application;
            return self::$group_service->GetMyGroupsList($g_application->security);
        } else {
            return self::$group_service->GetGroupsList((int) $_c937cc5681e9e01ba9775dbdf25a204b);
        }
    }
    
    
    
    
    
    
    
    
    
    
    
    public static function GetGroupNamesById($_9583d1bdd3e9e4bef2766e91be6bb71b, $_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        global $g_application;
        return self::$group_service->GetGroupNamesById($_9583d1bdd3e9e4bef2766e91be6bb71b, $g_application->security, $_c937cc5681e9e01ba9775dbdf25a204b);
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    public static function GetAllParentGroups($_9583d1bdd3e9e4bef2766e91be6bb71b, $_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        global $g_application;
        return self::$group_service->GetAllParentGroups($_9583d1bdd3e9e4bef2766e91be6bb71b, $g_application->security, $_c937cc5681e9e01ba9775dbdf25a204b);
    }
    
    
    
    
    
    
    
    
    
    
    public static function GetAllSubgroups($_9583d1bdd3e9e4bef2766e91be6bb71b)
    {
        return self::$group_service->GetAllSubgroups($_9583d1bdd3e9e4bef2766e91be6bb71b);
    }
    
    
    
    
    
    
    
    
    
    
    
    public static function AddUserGroups($_161fa4c6089ed7645dda77e187f5b1dd, $_9583d1bdd3e9e4bef2766e91be6bb71b)
    {
        return self::$group_service->AddUserGroups((int) $_161fa4c6089ed7645dda77e187f5b1dd, $_9583d1bdd3e9e4bef2766e91be6bb71b);
    }
    
    
    
    
    
    
    
    
    
    
    
    
    public static function SetUserGroups($_161fa4c6089ed7645dda77e187f5b1dd, $_9583d1bdd3e9e4bef2766e91be6bb71b)
    {
        global $g_application;
        return self::$group_service->SetUserGroups((int) $_161fa4c6089ed7645dda77e187f5b1dd, $_9583d1bdd3e9e4bef2766e91be6bb71b, $g_application->security);
    }
    
    
    
    
    
    
    
    
    
    
    public static function DeleteUserGroups($_161fa4c6089ed7645dda77e187f5b1dd, $_9583d1bdd3e9e4bef2766e91be6bb71b)
    {
        self::$group_service->DeleteUserGroups((int) $_161fa4c6089ed7645dda77e187f5b1dd, $_9583d1bdd3e9e4bef2766e91be6bb71b);
    }
    
    
    
    
    
    public function SetFilterKeywords($keywords)
    {
        self::$group_service->SetFilterKeywords($keywords);
    }
    
    
    
    
    
    public function count()
    {
        global $g_application;
        return self::$group_service->GetCount($g_application->security);
    }
    
    
    
    
    
    
    
    public function GetList($page_size, $_85008ed1ba1db3b691d57c5329e12ac8 = 0)
    {
        global $g_application;
        return self::$group_service->GetList($g_application->security, (int) $page_size, (int) $_85008ed1ba1db3b691d57c5329e12ac8);
    }
    
    
    
    
    
    
    public static function GetGroupsByNames($_215b92aa345d1aad980ddcf7b628af09)
    {
        if ($GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_5e30c4717ced36cff9e93e19a" . "5c576cc"]($_215b92aa345d1aad980ddcf7b628af09)) {
            $_215b92aa345d1aad980ddcf7b628af09 = [$_215b92aa345d1aad980ddcf7b628af09];
        }
        return self::$group_service->GetGroupsByNames($_215b92aa345d1aad980ddcf7b628af09);
    }
}


UserGroup::_Init();