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


PHP CRM_Mailing_DAO_Mailing::save方法代码示例

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


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

示例1: add

 /**
  * function to add the mailings
  *
  * @param array $params reference array contains the values submitted by the form
  * @param array $ids    reference array contains the id
  * 
  * @access public
  * @static 
  * @return object
  */
 static function add(&$params, &$ids)
 {
     require_once 'CRM/Utils/Hook.php';
     if (CRM_Utils_Array::value('mailing', $ids)) {
         CRM_Utils_Hook::pre('edit', 'Mailing', $ids['mailing_id'], $params);
     } else {
         CRM_Utils_Hook::pre('create', 'Mailing', null, $params);
     }
     $mailing = new CRM_Mailing_DAO_Mailing();
     $mailing->id = CRM_Utils_Array::value('mailing_id', $ids);
     if (!isset($params['replyto_email']) && isset($params['from_email'])) {
         $params['replyto_email'] = $params['from_email'];
     }
     $mailing->copyValues($params);
     $result = $mailing->save();
     if (CRM_Utils_Array::value('mailing', $ids)) {
         CRM_Utils_Hook::post('edit', 'Mailing', $mailing->id, $mailing);
     } else {
         CRM_Utils_Hook::post('create', 'Mailing', $mailing->id, $mailing);
     }
     return $result;
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:32,代码来源:Mailing.php

示例2: add

 /**
  * function to add the mailings
  *
  * @param array $params reference array contains the values submitted by the form
  * @param array $ids    reference array contains the id
  *
  * @access public
  * @static
  *
  * @return object
  */
 static function add(&$params, $ids = array())
 {
     $id = CRM_Utils_Array::value('mailing_id', $ids, CRM_Utils_Array::value('id', $params));
     if ($id) {
         CRM_Utils_Hook::pre('edit', 'Mailing', $id, $params);
     } else {
         CRM_Utils_Hook::pre('create', 'Mailing', NULL, $params);
     }
     $mailing = new CRM_Mailing_DAO_Mailing();
     $mailing->id = $id;
     $mailing->domain_id = CRM_Utils_Array::value('domain_id', $params, CRM_Core_Config::domainID());
     if (!isset($params['replyto_email']) && isset($params['from_email'])) {
         $params['replyto_email'] = $params['from_email'];
     }
     $mailing->copyValues($params);
     $result = $mailing->save();
     if (CRM_Utils_Array::value('mailing', $ids)) {
         CRM_Utils_Hook::post('edit', 'Mailing', $mailing->id, $mailing);
     } else {
         CRM_Utils_Hook::post('create', 'Mailing', $mailing->id, $mailing);
     }
     return $result;
 }
开发者ID:TheCraftyCanvas,项目名称:aegir-platforms,代码行数:34,代码来源:Mailing.php

示例3: upgrade_4620

 /**
  * Example: Run an external SQL script
  *
  * @return TRUE on success
  * @throws Exception
  */
 public function upgrade_4620()
 {
     $this->ctx->log->info('Applying update for version 2.0');
     $mail = new CRM_Mailing_DAO_Mailing();
     $mail->domain_id = CRM_Core_Config::domainID();
     $mail->subject = "***All Transactional Emails***";
     $mail->url_tracking = TRUE;
     $mail->forward_replies = FALSE;
     $mail->auto_responder = FALSE;
     $mail->open_tracking = TRUE;
     if ($mail->find(TRUE)) {
         $mail->name = ts('Transaction Emails');
         $mail->save();
     }
     $url = CRM_Utils_System::url('civicrm/mte/smtp', 'reset=1', TRUE, NULL, FALSE, TRUE);
     CRM_Core_Session::setStatus(ts("Update the <a href={$url}>Mandrill settings</a> to configure it to use for Transactional Email and/or Civi Bulk Mail."));
     return TRUE;
 }
开发者ID:vakeesan26,项目名称:biz.jmaconsulting.mte,代码行数:24,代码来源:Upgrader.php


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