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


PHP EmailTemplate::setCanDisable方法代码示例

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


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

示例1: EmailTemplate

    /**
     * Internal function to return an email template object from a row.
     * @param $row array
     * @return EmailTemplate
     */
    function &_returnEmailTemplateFromRow(&$row)
    {
        $emailTemplate = new EmailTemplate();
        $emailTemplate->setEmailKey($row['email_key']);
        $emailTemplate->setEnabled($row['enabled']);
        $emailTemplate->setCanDisable($row['can_disable']);
        if (!HookRegistry::call('EmailTemplateDAO::_returnEmailTemplateFromRow', array(&$emailTemplate, &$row))) {
            $result =& $this->retrieve('SELECT d.locale, d.description, d.subject, d.body
				FROM email_templates_data AS d
				WHERE d.email_key = ?', $row['email_key']);
            while (!$result->EOF) {
                $dataRow =& $result->GetRowAssoc(false);
                $emailTemplate->addLocale($dataRow['locale']);
                $emailTemplate->setSubject($dataRow['locale'], $dataRow['subject']);
                $emailTemplate->setBody($dataRow['locale'], $dataRow['body']);
                $emailTemplate->setDescription($dataRow['locale'], $dataRow['description']);
                $result->MoveNext();
            }
            $result->Close();
            unset($result);
        }
        return $emailTemplate;
    }
开发者ID:jalperin,项目名称:harvester,代码行数:28,代码来源:EmailTemplateDAO.inc.php

示例2: EmailTemplate

 /**
  * Internal function to return an email template object from a row.
  * @param $row array
  * @return EmailTemplate
  */
 function &_returnEmailTemplateFromRow(&$row, $isCustomTemplate = null)
 {
     $emailTemplate = new EmailTemplate();
     $emailTemplate->setEmailId($row['email_id']);
     $emailTemplate->setAssocType($row['assoc_type']);
     $emailTemplate->setAssocId($row['assoc_id']);
     $emailTemplate->setEmailKey($row['email_key']);
     $emailTemplate->setLocale($row['locale']);
     $emailTemplate->setSubject($row['subject']);
     $emailTemplate->setBody($row['body']);
     $emailTemplate->setEnabled($row['enabled'] == null ? 1 : $row['enabled']);
     $emailTemplate->setCanDisable($row['can_disable']);
     $emailTemplate->setFromRoleId($row['from_role_id']);
     $emailTemplate->setToRoleId($row['to_role_id']);
     if ($isCustomTemplate !== null) {
         $emailTemplate->setCustomTemplate($isCustomTemplate);
     }
     HookRegistry::call('EmailTemplateDAO::_returnEmailTemplateFromRow', array(&$emailTemplate, &$row));
     return $emailTemplate;
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:25,代码来源:PKPEmailTemplateDAO.inc.php


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