当前位置: 首页>>代码示例>>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;未经允许,请勿转载。