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


PHP EmailTemplate::getProcessedDescription方法代码示例

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


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

示例1: getMergedDescription

/**
 * 	This function is used to merge the Template Details with the email description
 *  @param string $description  -body of the mail(ie template)
 *	@param integer $tid  - Id of the entity
 *  @param string $parent_type - module of the entity
 * 	return string $description - Returns description, merged with the input template.
*/
function getMergedDescription($description, $id, $parent_type)
{
    global $adb, $log;
    $log->debug("Entering getMergedDescription ...");
    $token_data_pair = explode('$', $description);
    global $current_user;
    $emailTemplate = new EmailTemplate($parent_type, $description, $id, $current_user);
    $description = $emailTemplate->getProcessedDescription();
    $templateVariablePair = explode('$', $description);
    $tokenDataPair = explode('$', $description);
    $fields = array();
    for ($i = 1; $i < count($token_data_pair); $i += 2) {
        $module = explode('-', $tokenDataPair[$i]);
        $fields[$module[0]][] = $module[1];
    }
    if (is_array($fields['custom']) && count($fields['custom']) > 0) {
        //Puneeth : Added for custom date & time fields
        $description = getMergedDescriptionCustomVars($fields, $description);
    }
    $log->debug("Exiting from getMergedDescription ...");
    return $description;
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:29,代码来源:CommonUtils.php

示例2: getMergedDescription

 static function getMergedDescription($description, $id, $parent_type)
 {
     $current_user = vglobal('current_user');
     $token_data_pair = explode('$', $description);
     $emailTemplate = new EmailTemplate($parent_type, $description, $id, $current_user);
     $description = $emailTemplate->getProcessedDescription();
     $tokenDataPair = explode('$', $description);
     $fields = array();
     for ($i = 1; $i < count($token_data_pair); $i += 2) {
         $module = explode('-', $tokenDataPair[$i]);
         $fields[$module[0]][] = $module[1];
     }
     if (is_array($fields['custom']) && count($fields['custom']) > 0) {
         $description = self::getMergedDescriptionCustomVars($fields, $description);
     }
     return $description;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:17,代码来源:Functions.php

示例3: getMergedDescription

/**
 * 	This function is used to merge the Template Details with the email description
 *  @param string $description  -body of the mail(ie template)
 * 	@param integer $tid  - Id of the entity
 *  @param string $parent_type - module of the entity
 * 	return string $description - Returns description, merged with the input template.
 */
function getMergedDescription($description, $id, $parent_type)
{
    global $adb, $log;
    $log->debug("Entering getMergedDescription ...");
    $token_data_pair = explode('$', $description);
    global $current_user;
    if ($parent_type != 'Users') {
        $emailTemplate = new EmailTemplate($parent_type, $description, $id, $current_user);
        $description = $emailTemplate->getProcessedDescription();
    }
    $templateVariablePair = explode('$', $description);
    $tokenDataPair = explode('$', $description);
    $fields = array();
    for ($i = 1; $i < count($token_data_pair); $i += 2) {
        $module = explode('-', $tokenDataPair[$i]);
        $fields[$module[0]][] = $module[1];
    }
    if (is_array($fields['custom']) && count($fields['custom']) > 0) {
        //Puneeth : Added for custom date & time fields
        $description = getMergedDescriptionCustomVars($fields, $description);
    }
    if ($parent_type == 'Users' && is_array($fields["users"])) {
        $columnfields = implode(',', $fields["users"]);
        $query = "select {$columnfields} from vtiger_users where id=?";
        $result = $adb->pquery($query, array($id));
        foreach ($fields["users"] as $columnname) {
            $token_data = '$users-' . $columnname . '$';
            $description = str_replace($token_data, $adb->query_result($result, 0, $columnname), $description);
        }
    }
    $log->debug("Exiting from getMergedDescription ...");
    return $description;
}
开发者ID:jgjermeni,项目名称:corebos,代码行数:40,代码来源:CommonUtils.php


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