本文整理汇总了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;
}
示例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;
}
示例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;
}