當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CIMNotify::deleteByTag方法代碼示例

本文整理匯總了PHP中CIMNotify::deleteByTag方法的典型用法代碼示例。如果您正苦於以下問題:PHP CIMNotify::deleteByTag方法的具體用法?PHP CIMNotify::deleteByTag怎麽用?PHP CIMNotify::deleteByTag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CIMNotify的用法示例。


在下文中一共展示了CIMNotify::deleteByTag方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onBeforeConfirmNotify

 /**
  * Catches event from IM module, when user click on buttons in notify.
  * @param string $module Module.
  * @param string $tag Tag.
  * @param string $value Value.
  * @param mixed $notify Notify.
  * @return void
  */
 public static function onBeforeConfirmNotify($module, $tag, $value, $notify)
 {
     global $USER;
     $userId = $USER->getId();
     if (!($module === Driver::INTERNAL_MODULE_ID && $userId)) {
         return;
     }
     $sharingModel = static::loadByNotifyTag($tag);
     if (!$sharingModel) {
         return;
     }
     if (!$sharingModel->isToUser()) {
         return;
     }
     if ($sharingModel->getToEntity() !== self::CODE_USER . $userId) {
         return;
     }
     list(, $tag) = $sharingModel->getNotifyTags();
     \CIMNotify::deleteByTag($tag);
     if ($value === 'N') {
         $sharingModel->decline($userId);
         return;
     }
     if ($sharingModel->approve()) {
         $isFolder = $sharingModel->getLinkObject() instanceof Folder;
         $pathInListing = Driver::getInstance()->getUrlManager()->getUrlFocusController('showObjectInGrid', array('objectId' => $sharingModel->getLinkObjectId()));
         $message = Loc::getMessage($isFolder ? 'DISK_SHARING_MODEL_AUTOCONNECT_NOTIFY' : 'DISK_SHARING_MODEL_AUTOCONNECT_NOTIFY_FILE', array('#NAME#' => '<a href="' . $pathInListing . '">' . $sharingModel->getLinkObject()->getName() . '</a>', '#DESCRIPTION#' => '', '#DISCONNECT_LINK#' => ''));
         list($subTag, $tag) = $sharingModel->getNotifyTags();
         Driver::getInstance()->sendNotify(substr($sharingModel->getToEntity(), 1), array('FROM_USER_ID' => $sharingModel->getCreatedBy(), 'NOTIFY_EVENT' => 'sharing', 'NOTIFY_TAG' => $tag, 'NOTIFY_SUB_TAG' => $subTag, 'NOTIFY_MESSAGE' => $message, 'NOTIFY_MESSAGE_OUT' => strip_tags($message)));
     }
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:39,代碼來源:sharing.php

示例2: onBeforeConfirmNotify

 public static function onBeforeConfirmNotify($module, $tag, $value, $notify)
 {
     global $USER;
     $userId = $USER->getId();
     if (!($module == Driver::INTERNAL_MODULE_ID && $userId)) {
         return;
     }
     $sharingModel = static::loadByNotifyTag($tag);
     if (!$sharingModel) {
         return;
     }
     if (!$sharingModel->isToUser()) {
         return;
     }
     if ($sharingModel->getToEntity() != self::CODE_USER . $userId) {
         return;
     }
     list(, $tag) = $sharingModel->getNotifyTags();
     \CIMNotify::deleteByTag($tag);
     if ($value === 'N') {
         $sharingModel->decline($userId);
         return;
     }
     $sharingModel->approve();
     return;
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:26,代碼來源:sharing.php

示例3: removeNotifyToUser

 private static function removeNotifyToUser(array $folderInvite)
 {
     if (\Bitrix\Main\Loader::includeModule('im')) {
         \CIMNotify::deleteByTag(self::getNotifyTag($folderInvite));
     }
     \CWebDavDiskDispatcher::sendChangeStatus($folderInvite['INVITE_USER_ID'], 'delete_symlink');
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:7,代碼來源:folderinvite.php


注:本文中的CIMNotify::deleteByTag方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。