本文整理匯總了PHP中Docs::getEmailTemplates2方法的典型用法代碼示例。如果您正苦於以下問題:PHP Docs::getEmailTemplates2方法的具體用法?PHP Docs::getEmailTemplates2怎麽用?PHP Docs::getEmailTemplates2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Docs
的用法示例。
在下文中一共展示了Docs::getEmailTemplates2方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
Yii::app()->clientScript->registerCssFile($this->module->assetsUrl . '/css/campaignForm.css');
$insertableAttributes = array();
foreach (X2Model::model('Contacts')->attributeLabels() as $fieldName => $label) {
$insertableAttributes[$label] = '{' . $fieldName . '}';
}
$insertableAttributes[Yii::t('profile', 'Signature')] = '{signature}';
$contacts = Yii::t('contacts', '{module} Attributes', array('{module}' => Modules::displayName(false, "Contacts")));
$JSParams = CJSON::encode(array('insertableAttributes' => array($contacts => $insertableAttributes)));
Yii::app()->clientScript->registerScriptFile($this->module->assetsUrl . '/js/CampaignForm.js');
Yii::app()->clientScript->registerScript('editorSetup', "\n x2.CampaignForm ({$JSParams});\n", CClientScript::POS_READY);
$contactLists = CHtml::listData(Campaign::getValidContactLists(), 'id', 'name');
if ($model->list && !in_array($model->list->id, array_keys($contactLists))) {
$contactLists[$model->list->id] = $model->list->name;
$contactLists = ArrayUtil::asorti($contactLists);
}
$templates = CHtml::listData(Docs::getEmailTemplates2('email', 'Contacts'), 'id', 'name');
$templates[0] = Yii::t('marketing', "Custom");
$form = $this->beginWidget('CActiveForm', array('id' => 'campaign-form', 'enableAjaxValidation' => false));
?>
<div id='top-container'>
<div id='campaign-basic-form'>
<div class='row'>
<label><?php
echo Yii::t('marketing', 'Campaign Name:');
?>
</label>
<?php
echo $model->renderInput('name');
?>
</div>