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


PHP Basic::save方法代码示例

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


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

示例1: save

 /**
  * @see SugarBean::save()
  */
 public function save($check_notify = false)
 {
     if (!empty($this->uploadfile)) {
         $this->filename = $this->uploadfile;
     }
     return parent::save($check_notify);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:10,代码来源:File.php

示例2: save

 /**
  * @see parent::save()
  */
 public function save($check_notify = false)
 {
     if (!empty($GLOBALS['resavingRelatedBeans'])) {
         return parent::save($check_notify);
     }
     $this->add_address_streets('billing_address_street');
     $this->add_address_streets('shipping_address_street');
     $ori_in_workflow = empty($this->in_workflow) ? false : true;
     $this->emailAddress->handleLegacySave($this, $this->module_dir);
     $record_id = parent::save($check_notify);
     $override_email = array();
     if (!empty($this->email1_set_in_workflow)) {
         $override_email['emailAddress0'] = $this->email1_set_in_workflow;
     }
     if (!empty($this->email2_set_in_workflow)) {
         $override_email['emailAddress1'] = $this->email2_set_in_workflow;
     }
     if (!isset($this->in_workflow)) {
         $this->in_workflow = false;
     }
     if ($ori_in_workflow === false || !empty($override_email)) {
         $this->emailAddress->save($this->id, $this->module_dir, $override_email, '', '', '', '', $this->in_workflow);
     }
     return $record_id;
 }
开发者ID:alachaum,项目名称:sugarcrm,代码行数:28,代码来源:Company.php

示例3: save

 /**
  *
  * @see parent::save()
  */
 public function save($check_notify = false)
 {
     if (static::inOperation('saving_related')) {
         parent::save($check_notify);
         return $this;
     }
     $this->add_address_streets('billing_address_street');
     $this->add_address_streets('shipping_address_street');
     $ori_in_workflow = empty($this->in_workflow) ? false : true;
     $this->emailAddress->handleLegacySave($this, $this->module_dir);
     parent::save($check_notify);
     $override_email = array();
     if (!empty($this->email1_set_in_workflow)) {
         $override_email['emailAddress0'] = $this->email1_set_in_workflow;
     }
     if (!empty($this->email2_set_in_workflow)) {
         $override_email['emailAddress1'] = $this->email2_set_in_workflow;
     }
     if (!isset($this->in_workflow)) {
         $this->in_workflow = false;
     }
     if ($ori_in_workflow === false || !empty($override_email)) {
         $this->emailAddress->save($this->id, $this->module_dir, $override_email, '', '', '', '', $this->in_workflow);
     }
     return $this;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:30,代码来源:Company.php

示例4: save

 /**
  * Saves the current comment.
  * @param  boolean $check_notify
  * @return string|bool           GUID of saved comment or false.
  */
 public function save($check_notify = false)
 {
     //if a string convert to object
     if (is_string($this->data)) {
         $this->data = json_decode($this->data, true);
     }
     if (!empty($this->data['value'])) {
         $this->data['value'] = SugarCleaner::cleanHtml($this->data['value']);
     }
     if (!is_string($this->data)) {
         $this->data = json_encode($this->data);
     }
     $activity = BeanFactory::getBean('Activities', $this->parent_id);
     if (!empty($activity) && $activity->id) {
         $isNew = empty($this->id) || $this->new_with_id;
         if (parent::save($check_notify)) {
             if ($isNew) {
                 $activity->addComment($this);
                 $this->processCommentTags($activity);
             }
             return $this->id;
         }
     }
     return false;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:30,代码来源:Comment.php

示例5: save

 /**
  * {@inheritDoc}
  *
  * The created_by field must be kept in sync with the user_id field in order for the $created filter to work. This
  * fix (for jira: MAR-1841; SI: 67320) should be replaced by a refactor of the UserSignatures module so that the
  * user_id field can be dropped in favor of created_by.
  *
  * @param bool $check_notify
  * @return String
  */
 public function save($check_notify = false)
 {
     if (empty($this->user_id)) {
         $this->user_id = $GLOBALS['current_user']->id;
     }
     if ($this->created_by !== $this->user_id) {
         $this->created_by = $this->user_id;
     }
     return parent::save($check_notify);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:20,代码来源:UserSignature.php

示例6: save

 function save($notification = false)
 {
     $focus = new Reports_Merge_Utils();
     $focus->uploadTemplate($this);
     $info = pathinfo($this->filename);
     $this->extension_template = $info['extension'];
     if (empty($this->report_filename)) {
         $this->report_filename = $info['filename'] . ' ' . $this->date_format_for_name;
     }
     parent::save($notification);
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:11,代码来源:OfficeReportMerge.php

示例7: save

 function save($check_notify = FALSE)
 {
     if (empty($this->id)) {
         unset($_POST['aow_conditions_id']);
         unset($_POST['aow_actions_id']);
     }
     parent::save($check_notify);
     require_once 'modules/AOW_Conditions/AOW_Condition.php';
     $condition = new AOW_Condition();
     $condition->save_lines($_POST, $this, 'aow_conditions_');
     require_once 'modules/AOW_Actions/AOW_Action.php';
     $action = new AOW_Action();
     $action->save_lines($_POST, $this, 'aow_actions_');
 }
开发者ID:isrealconsulting,项目名称:ic-suite,代码行数:14,代码来源:AOW_WorkFlow.php

示例8: save

 function save($check_notify = false)
 {
     $move = false;
     $upload_file = new UploadFile('uploadfile');
     if (isset($_FILES['uploadfile']) && $upload_file->confirm_upload()) {
         $this->filename = $upload_file->get_stored_file_name();
         $this->file_mime_type = $upload_file->mime_type;
         $this->file_ext = $upload_file->file_ext;
         $move = true;
     }
     parent::save($check_notify);
     if ($move) {
         $upload_file->final_move($this->id);
     }
     return $this->id;
     //handleRedirect($return_id, $this->object_name);
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:17,代码来源:File.php

示例9: save

 function save($check_notify = FALSE)
 {
     if (empty($this->id)) {
         unset($_POST['aor_conditions_id']);
         unset($_POST['aor_fields_id']);
     }
     parent::save($check_notify);
     require_once 'modules/AOR_Fields/AOR_Field.php';
     $condition = new AOR_Field();
     $condition->save_lines($_POST, $this, 'aor_fields_');
     require_once 'modules/AOR_Conditions/AOR_Condition.php';
     $condition = new AOR_Condition();
     $condition->save_lines($_POST, $this, 'aor_conditions_');
     require_once 'modules/AOR_Charts/AOR_Chart.php';
     $chart = new AOR_Chart();
     $chart->save_lines($_POST, $this, 'aor_chart_');
 }
开发者ID:omusico,项目名称:suitecrm-docker,代码行数:17,代码来源:AOR_Report.php

示例10: save

 function save($check_notify = FALSE)
 {
     // TODO: process of saveing the fields and conditions is too long so we will have to make some optimization on save_lines functions
     set_time_limit(3600);
     if (empty($this->id)) {
         unset($_POST['aor_conditions_id']);
         unset($_POST['aor_fields_id']);
     }
     parent::save($check_notify);
     require_once 'modules/AOR_Fields/AOR_Field.php';
     $field = new AOR_Field();
     $field->save_lines($_POST, $this, 'aor_fields_');
     require_once 'modules/AOR_Conditions/AOR_Condition.php';
     $condition = new AOR_Condition();
     $condition->save_lines($_POST, $this, 'aor_conditions_');
     require_once 'modules/AOR_Charts/AOR_Chart.php';
     $chart = new AOR_Chart();
     $chart->save_lines($_POST, $this, 'aor_chart_');
 }
开发者ID:auf,项目名称:crm_auf_org,代码行数:19,代码来源:AOR_Report.php

示例11: save

 /**
  * Saving overwritten to add conditions.
  * @see Basic::save()
  */
 public function save()
 {
     if ($this->is_bad == true) {
         return false;
     }
     if (!mb_strlen($this->ga_headline, 'utf-8')) {
         echo "NO head\r\n";
         return false;
     }
     if (!mb_strlen($this->ga_description1, 'utf-8')) {
         echo "NO description1\r\n";
         return false;
     }
     if (!mb_strlen($this->ga_description2, 'utf-8')) {
         echo "NO description2\r\n";
         return false;
     }
     return parent::save();
 }
开发者ID:sergrin,项目名称:crawlers-il,代码行数:23,代码来源:GoogleAd.php

示例12: save

 function save($check_notify = false)
 {
     $this->add_address_streets('primary_address_street');
     $this->add_address_streets('alt_address_street');
     $ori_in_workflow = empty($this->in_workflow) ? false : true;
     $this->emailAddress->handleLegacySave($this, $this->module_dir);
     parent::save($check_notify);
     $override_email = array();
     if (!empty($this->email1_set_in_workflow)) {
         $override_email['emailAddress0'] = $this->email1_set_in_workflow;
     }
     if (!empty($this->email2_set_in_workflow)) {
         $override_email['emailAddress1'] = $this->email2_set_in_workflow;
     }
     if (!isset($this->in_workflow)) {
         $this->in_workflow = false;
     }
     if ($ori_in_workflow === false || !empty($override_email)) {
         $this->emailAddress->save($this->id, $this->module_dir, $override_email, '', '', '', '', $this->in_workflow);
     }
     return $this->id;
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:22,代码来源:Person.php

示例13: save

 /**
  * @see parent::save()
  */
 public function save($check_notify = false)
 {
     //If we are saving due to relationship changes, don't bother trying to update the emails
     if (!empty($GLOBALS['resavingRelatedBeans'])) {
         parent::save($check_notify);
         return $this->id;
     }
     $this->add_address_streets('primary_address_street');
     $this->add_address_streets('alt_address_street');
     $ori_in_workflow = empty($this->in_workflow) ? false : true;
     $this->emailAddress->handleLegacySave($this, $this->module_dir);
     // bug #39188 - store emails state before workflow make any changes
     $this->emailAddress->stash($this->id, $this->module_dir);
     parent::save($check_notify);
     // $this->emailAddress->evaluateWorkflowChanges($this->id, $this->module_dir);
     $override_email = array();
     if (!empty($this->email1_set_in_workflow)) {
         $override_email['emailAddress0'] = $this->email1_set_in_workflow;
     }
     if (!empty($this->email2_set_in_workflow)) {
         $override_email['emailAddress1'] = $this->email2_set_in_workflow;
     }
     if (!isset($this->in_workflow)) {
         $this->in_workflow = false;
     }
     if ($ori_in_workflow === false || !empty($override_email)) {
         $this->emailAddress->save($this->id, $this->module_dir, $override_email, '', '', '', '', $this->in_workflow);
         // $this->emailAddress->applyWorkflowChanges($this->id, $this->module_dir);
     }
     return $this->id;
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:34,代码来源:Person.php

示例14: save

 function save($check_notify = FALSE)
 {
     $this->fillInName();
     if (!is_admin($GLOBALS['current_user'])) {
         $this->assigned_user_id = $GLOBALS['current_user']->id;
     }
     $parentRet = parent::save($check_notify);
     // Nuke the EAPM cache for this record
     if (isset($_SESSION['EAPM'][$this->application])) {
         unset($_SESSION['EAPM'][$this->application]);
     }
     return $parentRet;
 }
开发者ID:BMLP,项目名称:memoryhole-ansible,代码行数:13,代码来源:EAPM.php

示例15: save

 /**
  * {@inheritdoc}
  *
  * Attempt to subscribe the user to the favorited bean after saving.
  *
  * @param bool $check_notify
  * @return String
  */
 public function save($check_notify = false)
 {
     parent::save($check_notify);
     $this->subscribeAfterFavorite();
     return $this->id;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:14,代码来源:SugarFavorites.php


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