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


PHP SugarBean::mark_deleted方法代碼示例

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


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

示例1: mark_deleted

 public function mark_deleted($id)
 {
     // for now only delete comments, not the products
     //$lineItems = $this->getLineItems();
     $this->load_relationship('product_bundle_notes');
     $lineItems = $this->product_bundle_notes->getBeans();
     /* @var $item SugarBean */
     foreach ($lineItems as $item) {
         $item->mark_deleted($item->id);
     }
     return parent::mark_deleted($id);
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:12,代碼來源:ProductBundle.php

示例2: action_remove

 /**
  * Action Remove
  */
 protected function action_remove()
 {
     $this->view = 'json';
     if (!$this->retrieveCurrentBean('Delete')) {
         return;
     }
     if ($this->currentBean->module_dir == "Meetings" || $this->currentBean->module_dir == "Calls") {
         if (!empty($_REQUEST['remove_all_recurrences']) && $_REQUEST['remove_all_recurrences']) {
             CalendarUtils::markRepeatDeleted($this->currentBean);
         }
     }
     $this->currentBean->mark_deleted($_REQUEST['record']);
     $this->view_object_map['jsonData'] = array('access' => 'yes');
 }
開發者ID:omusico,項目名稱:sugar_work,代碼行數:17,代碼來源:controller.php

示例3: mark_deleted

 public function mark_deleted($id)
 {
     // reset caches
     $this->clearACLCache();
     parent::mark_deleted($id);
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:6,代碼來源:ACLAction.php

示例4: mark_deleted

 /**
  * Checks to see if the user owns this mapping or is an admin first
  * If true, then call parent function
  *
  * @param $id
  */
 public function mark_deleted($id)
 {
     global $current_user;
     if (!is_admin($current_user)) {
         $other_map = new ImportMap();
         $other_map->retrieve_by_string_fields(array('id' => $id), false);
         if ($other_map->assigned_user_id != $current_user->id) {
             return false;
         }
     }
     return parent::mark_deleted($id);
 }
開發者ID:sysraj86,項目名稱:carnivalcrm,代碼行數:18,代碼來源:ImportMap.php

示例5: unlink

 /**
  * overrides SugarBean's method.
  * If a system setting is set, it will mark all related notes as deleted, and attempt to delete files that are
  * related to those notes
  * @param string id ID
  */
 function mark_deleted($id)
 {
     global $sugar_config;
     if ($this->parent_type == 'Emails') {
         if (isset($sugar_config['email_default_delete_attachments']) && $sugar_config['email_default_delete_attachments'] == true) {
             $removeFile = "upload://{$id}";
             if (file_exists($removeFile)) {
                 if (!unlink($removeFile)) {
                     $GLOBALS['log']->error("*** Could not unlink() file: [ {$removeFile} ]");
                 }
             }
         }
     }
     // delete note
     parent::mark_deleted($id);
 }
開發者ID:omusico,項目名稱:windcrm,代碼行數:22,代碼來源:Note.php

示例6: mark_deleted

    public function mark_deleted($id)
    {
        require_once("modules/Calendar/CalendarUtils.php");
        CalendarUtils::correctRecurrences($this, $id);

        parent::mark_deleted($id);
    }
開發者ID:eggsurplus,項目名稱:SuiteCRM,代碼行數:7,代碼來源:Call.php

示例7:

 /**
  * Overrides SugarBean's mark_deleted() to drop the related cache table
  * @param string $id GUID of I-E instance
  */
 function mark_deleted($id)
 {
     parent::mark_deleted($id);
     //bug52021  we need to keep the reference to the folders table in order for emails module to function properly
     //$q = "update inbound_email set groupfolder_id = null WHERE id = '{$id}'";
     //$r = $this->db->query($q);
     $this->deleteCache();
 }
開發者ID:thsonvt,項目名稱:sugarcrm_dev,代碼行數:12,代碼來源:InboundEmail.php

示例8:

 function mark_deleted($id)
 {
     $query = "update contacts set campaign_id = null where campaign_id = '{$id}' ";
     $this->db->query($query);
     $query = "update accounts set campaign_id = null where campaign_id = '{$id}' ";
     $this->db->query($query);
     // bug49632 - delete campaign logs for the campaign as well
     $query = "update campaign_log set deleted = 1 where campaign_id = '{$id}' ";
     $this->db->query($query);
     return parent::mark_deleted($id);
 }
開發者ID:butschster,項目名稱:sugarcrm_dev,代碼行數:11,代碼來源:Campaign.php

示例9: deleteIfFails

 /**
  * Provides ability to mark a SugarBean deleted if related file upload failed (and user passed
  * the delete_if_fails optional parameter). Note, private to respect "Principle of least privilege"
  * If you need in derived classes then you may change to protected.
  *
  * @param SugarBean $bean Bean
  * @param array $args The request args
  * @return false if no deletion occured because delete_if_fails was not set otherwise true.
  */
 protected function deleteIfFails($bean, $args)
 {
     // Bug 57210: Need to be able to mark a related record 'deleted=1' when a file uploads fails.
     // delete_if_fails flag is an optional query string which can trigger this behavior. An example
     // use case might be: user's in a modal and client: 1. POST's related record 2. uploads file...
     // If the file was too big, the user may still want to go back and select a smaller file < max;
     // but now, upon saving, the client will attempt to PUT related record first and if their ACL's
     // may prevent edit/deletes it would fail. This rectifies such a scenario.
     if (!empty($args['delete_if_fails'])) {
         // First ensure user owns record
         if ($bean->created_by == $GLOBALS['current_user']->id) {
             $bean->mark_deleted($bean->id);
             return true;
         }
     }
     return false;
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:26,代碼來源:FileApi.php

示例10: ReportSchedule

 function mark_deleted($id)
 {
     require_once 'modules/Reports/schedule/ReportSchedule.php';
     $report_schedule = new ReportSchedule();
     $scheduled_reports = $report_schedule->get_report_schedule($id);
     foreach ($scheduled_reports as $rs_row) {
         $report_schedule->mark_deleted($rs_row['id']);
     }
     parent::mark_deleted($id);
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:10,代碼來源:SavedReport.php

示例11: mark_deleted

 /**
  * Delete all the associated Product Bundles from a Quote, This ensures that no orphaned records are left behind,
  * when deleting a record.
  *
  * @param string $id The ID of the record that is being marked as deleted
  */
 public function mark_deleted($id)
 {
     // make sure we have the bean loaded
     if ($this->id !== $id) {
         $this->retrieve($id);
     }
     // load up all the product bundles and delete them
     $this->load_relationship('product_bundles');
     $bundles = $this->product_bundles->getBeans();
     /* @var $bundle ProductBundle */
     foreach ($bundles as $bundle) {
         $bundle->mark_deleted($bundle->id);
     }
     parent::mark_deleted($id);
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:21,代碼來源:Quote.php

示例12: mark_deleted

 public function mark_deleted($id)
 {
     if ($this->id != $id) {
         $this->retrieve($id);
         // does not exist - no need to delete
         if (empty($this->id)) {
             return;
         }
     }
     remove_logic_hook($this->webhook_target_module, $this->trigger_event, $this->getActionArray());
     parent::mark_deleted($id);
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:12,代碼來源:WebLogicHook.php

示例13:

 function mark_deleted($id)
 {
     //remove prospects::prospectLists relationships
     $query = "UPDATE prospect_lists_prospects SET deleted = 1 WHERE prospect_list_id = '{$id}' ";
     $this->db->query($query);
     //remove campaigns::prospectLists relationships
     $query = "UPDATE prospect_list_campaigns SET deleted = 1 WHERE prospect_list_id = '{$id}' ";
     $this->db->query($query);
     return parent::mark_deleted($id);
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:10,代碼來源:ProspectList.php

示例14: action_delete

 /**
  * Perform the actual deletion.
  */
 protected function action_delete()
 {
     //do any pre delete processing
     //if there is some custom logic for deletion.
     if (!empty($_REQUEST['record'])) {
         if (!$this->bean->ACLAccess('Delete')) {
             ACLController::displayNoAccess(true);
             sugar_cleanup(true);
         }
         $this->bean->mark_deleted($_REQUEST['record']);
     } else {
         sugar_die("A record number must be specified to delete");
     }
 }
開發者ID:butschster,項目名稱:sugarcrm_dev,代碼行數:17,代碼來源:SugarController.php

示例15: mark_deleted

 function mark_deleted($id)
 {
     $rc = new ReportContainer();
     $rc = $rc->retrieve($id);
     if ($rc) {
         $child_containers = $rc->get_linked_beans("containers", "ReportContainer");
         $child_reports = $rc->get_linked_beans("reports", "ZuckerReport");
         foreach ($child_containers as $c) {
             $c->parent_id = $rc->parent_id;
             $c->save();
         }
         foreach ($child_reports as $r) {
             $r->container_id = $rc->parent_id;
             $r->save();
         }
     }
     SugarBean::mark_deleted($id);
 }
開發者ID:aldridged,項目名稱:gtg-sugar,代碼行數:18,代碼來源:ReportContainer.php


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