当前位置: 首页>>代码示例>>PHP>>正文


PHP Notification::remove方法代码示例

本文整理汇总了PHP中Notification::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP Notification::remove方法的具体用法?PHP Notification::remove怎么用?PHP Notification::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Notification的用法示例。


在下文中一共展示了Notification::remove方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: beforeDelete

 /**
  * Before Delete, remove LikeCount (Cache) of target object.
  * Remove activity
  */
 protected function beforeDelete()
 {
     $this->flushCache();
     Notification::remove('Comment', $this->id);
     return parent::beforeDelete();
 }
开发者ID:ahdail,项目名称:humhub,代码行数:10,代码来源:Comment.php

示例2: array

$tpl->setTemplate("notification.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$usr_id = Auth::getUserID();
$prj_id = Auth::getCurrentProject();
$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["iss_id"];
$tpl->assign("issue_id", $issue_id);
// format default actions properly
$default = Notification::getDefaultActions();
$res = array();
foreach ($default as $action) {
    $res[$action] = 1;
}
$tpl->assign("default_actions", $res);
if (@$HTTP_POST_VARS["cat"] == "insert") {
    $res = Notification::subscribeEmail($usr_id, $issue_id, $HTTP_POST_VARS['email'], $HTTP_POST_VARS['actions']);
    $tpl->assign("insert_result", $res);
} elseif (@$HTTP_GET_VARS["cat"] == "edit") {
    $res = Notification::getDetails($HTTP_GET_VARS["id"]);
    $tpl->assign("info", $res);
} elseif (@$HTTP_POST_VARS["cat"] == "update") {
    $res = Notification::update($HTTP_POST_VARS["id"]);
    $tpl->assign("update_result", $res);
} elseif (@$HTTP_POST_VARS["cat"] == "delete") {
    $res = Notification::remove($HTTP_POST_VARS["items"]);
    $tpl->assign("delete_result", $res);
}
$tpl->assign("list", Notification::getSubscriberListing($issue_id));
$t = Project::getAddressBook($prj_id, $issue_id);
$tpl->assign("assoc_users", $t);
$tpl->assign("allowed_emails", Project::getAddressBookEmails($prj_id, $issue_id));
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:notification.php

示例3: beforeDelete

 /**
  * Before Delete, remove LikeCount (Cache) of target object.
  * Remove activity
  */
 protected function beforeDelete()
 {
     Yii::app()->cache->delete('likes_' . $this->object_model . "_" . $this->object_id);
     // Delete Activity
     // Currently we need to delete this manually, because the activity object is NOT bound to the Like
     // Instead is it bound to the Like Target (This should changed)
     $activity = Activity::model()->findByAttributes(array('type' => 'Interest', 'module' => 'like', 'object_model' => $this->object_model, 'object_id' => $this->object_id, 'created_by' => $this->created_by));
     if ($activity) {
         $activity->delete();
     }
     Notification::remove('Interest', $this->id);
     return parent::beforeDelete();
 }
开发者ID:skapl,项目名称:design,代码行数:17,代码来源:Like.php

示例4: isset

$tpl->assign('default_actions', $res);
$cat = isset($_POST['cat']) ? (string) $_POST['cat'] : (isset($_GET['cat']) ? (string) $_GET['cat'] : null);
if ($cat == 'insert') {
    $res = Notification::subscribeEmail($usr_id, $issue_id, $_POST['email'], $_POST['actions']);
    if ($res == 1) {
        Misc::setMessage(ev_gettext('Thank you, the email has been subscribed to the issue.'));
    }
} elseif ($cat == 'update') {
    $res = Notification::update($issue_id, $_POST['id'], $_POST['email']);
    if ($res == 1) {
        Misc::setMessage(ev_gettext('Thank you, the notification entry was updated successfully.'));
    } elseif ($res == -1) {
        Misc::setMessage(ev_gettext('An error occurred while trying to update the notification entry.'), Misc::MSG_ERROR);
    } elseif ($res == -2) {
        Misc::setMessage(ev_gettext('Error: the given email address is not allowed to be added to the notification list.'), Misc::MSG_ERROR);
    }
    Auth::redirect(APP_RELATIVE_URL . 'notification.php?iss_id=' . $issue_id);
} elseif ($cat == 'edit') {
    $res = Notification::getDetails($_GET['id']);
    $tpl->assign('info', $res);
} elseif ($cat == 'delete') {
    $res = Notification::remove($_POST['items']);
    if ($res == 1) {
        Misc::setMessage(ev_gettext('Thank you, the items have been deleted.'));
    }
}
$tpl->assign('list', Notification::getSubscriberListing($issue_id));
$t = Project::getAddressBook($prj_id, $issue_id);
$tpl->assign('assoc_users', $t);
$tpl->assign('allowed_emails', Project::getAddressBookEmails($prj_id, $issue_id));
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:notification.php

示例5: beforeDelete

 /**
  * Before Delete, remove LikeCount (Cache) of target object.
  * Remove activity
  */
 protected function beforeDelete()
 {
     Notification::remove('Post', $this->id);
     return parent::beforeDelete();
 }
开发者ID:ahdail,项目名称:humhub,代码行数:9,代码来源:Post.php

示例6: beforeDelete

 /**
  * Cleanup AlbumImage
  */
 public function beforeDelete()
 {
     $cover = $this->cover;
     if ($cover != null) {
         $cover->delete();
     }
     foreach ($this->getImages() as $image) {
         $image->delete();
     }
     /**
      * Remove notifications.
      */
     Notification::remove('Album', $this->id);
     return parent::beforeDelete();
 }
开发者ID:rafapaul,项目名称:humhub-modules-album,代码行数:18,代码来源:Album.php

示例7: ajax_remove_notification

 function ajax_remove_notification()
 {
     RoutingEngine::setPage("runnDAILY User Remove Notification", "PV__300");
     if (!isset($_POST["id"])) {
         return false;
     }
     $id = $_POST["id"];
     Notification::remove($id);
     RoutingEngine::getInstance()->persistUserData();
     RoutingEngine::returnAjax(true);
 }
开发者ID:byronwall,项目名称:runnDAILY,代码行数:11,代码来源:user.php

示例8: removeByIssues

 /**
  * Method used to remove all subscriptions associated with a given
  * set of issues.
  *
  * @access  public
  * @param   array $ids The list of issues
  * @return  boolean
  */
 function removeByIssues($ids)
 {
     $items = @implode(", ", Misc::escapeInteger($ids));
     $stmt = "SELECT\r\n                    sub_id\r\n                 FROM\r\n                    " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "subscription\r\n                 WHERE\r\n                    sub_iss_id IN ({$items})";
     $res = $GLOBALS["db_api"]->dbh->getCol($stmt);
     if (PEAR::isError($res)) {
         Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
         return false;
     } else {
         Notification::remove($res);
         return true;
     }
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:21,代码来源:class.notification.php


注:本文中的Notification::remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。