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


PHP Tracker::makeInvisibleForAll方法代碼示例

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


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

示例1: testmakeInvisibleForAll

 public function testmakeInvisibleForAll()
 {
     $tracker = new Tracker();
     //execute the method and test if it works and does not throws an exception.
     try {
         $tracker->makeInvisibleForAll(1);
         $this->assertTrue(true);
     } catch (Exception $e) {
         $this->fail();
     }
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:11,代碼來源:TrackerTest.php

示例2: Tracker

 /**
  * This function should be overridden in each module.  It marks an item as deleted.
  *
  * If it is not overridden, then marking this type of item is not allowed
  */
 function mark_deleted($id)
 {
     global $current_user;
     $date_modified = $GLOBALS['timedate']->nowDb();
     if (isset($_SESSION['show_deleted'])) {
         $this->mark_undeleted($id);
     } else {
         // call the custom business logic
         $custom_logic_arguments['id'] = $id;
         $this->call_custom_logic("before_delete", $custom_logic_arguments);
         if (isset($this->field_defs['modified_user_id'])) {
             if (!empty($current_user)) {
                 $this->modified_user_id = $current_user->id;
             } else {
                 $this->modified_user_id = 1;
             }
             $query = "UPDATE {$this->table_name} set deleted=1 , date_modified = '{$date_modified}', modified_user_id = '{$this->modified_user_id}' where id='{$id}'";
         } else {
             $query = "UPDATE {$this->table_name} set deleted=1 , date_modified = '{$date_modified}' where id='{$id}'";
         }
         $this->db->query($query, true, "Error marking record deleted: ");
         $this->deleted = 1;
         $this->mark_relationships_deleted($id);
         // Take the item off the recently viewed lists
         $tracker = new Tracker();
         $tracker->makeInvisibleForAll($id);
         // call the custom business logic
         $this->call_custom_logic("after_delete", $custom_logic_arguments);
     }
 }
開發者ID:rgauss,項目名稱:sugarcrm_dev,代碼行數:35,代碼來源:SugarBean.php

示例3: gmdate

 function oqc_mark_deleted($id)
 {
     global $current_user;
     $date_modified = gmdate($GLOBALS['timedate']->get_db_date_time_format());
     if (isset($this->field_defs['modified_user_id'])) {
         if (!empty($current_user)) {
             $this->modified_user_id = $current_user->id;
         } else {
             $this->modified_user_id = 1;
         }
         $query = "UPDATE {$this->table_name} set is_latest=0 , date_modified = '{$date_modified}', modified_user_id = '{$this->modified_user_id}' where id='{$id}'";
     } else {
         $query = "UPDATE {$this->table_name} set is_latest=0 , date_modified = '{$date_modified}' where id='{$id}'";
     }
     $this->db->query($query, true, "Error marking record deleted: ");
     // Take the item off the recently viewed lists
     $tracker = new Tracker();
     $tracker->makeInvisibleForAll($id);
 }
開發者ID:santara12,項目名稱:OpenQuotesAndContracts,代碼行數:19,代碼來源:oqc_Product.php


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