Пример #1
0
 public static function OnSocNetGroupDelete($groupId)
 {
     $iblockIds = self::GetGroupIblock();
     foreach ($iblockIds as $iblockId) {
         $result = CIBlockWebdavSocnet::GetSectionID($iblockId, 'group', $groupId);
         if (intval($result) > 0) {
             if (!empty($groupId)) {
                 $dispatcher = new \Bitrix\Webdav\InviteDispatcher();
                 $attachObjectType = CWebDavSymlinkHelper::ENTITY_TYPE_GROUP;
                 $attachObjectId = (int) $groupId;
                 $inviteComponentParams = array('attachObject' => array('id' => $attachObjectId, 'type' => $attachObjectType), 'unshareUserIds' => array());
                 $response = $dispatcher->processActionUnshare($inviteComponentParams);
                 if ($response['status'] == $dispatcher::STATUS_SUCCESS) {
                 }
             }
             CIBlockSection::Delete($result);
         }
     }
     CIBlockWebdavSocnet::ClearTagCache('wd_socnet');
 }