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


PHP Mage_Core_Model_Email_Template::getId方法代码示例

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


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

示例1: checkCodeUsage

 /**
  * Check usage of template code in other templates
  *
  * @param   Mage_Core_Model_Email_Template $template
  * @return  boolean
  */
 public function checkCodeUsage(Mage_Core_Model_Email_Template $template)
 {
     if ($template->getTemplateActual() != 0 || is_null($template->getTemplateActual())) {
         $select = $this->_read->select()->from($this->_templateTable, new Zend_Db_Expr('COUNT(template_id)'))->where('template_id!=?', $template->getId())->where('template_code=?', $template->getTemplateCode());
         $countOfCodes = $this->_read->fetchOne($select);
         return $countOfCodes > 0;
     } else {
         return false;
     }
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:16,代码来源:Template.php

示例2: checkCodeUsage

 /**
  * Check usage of template code in other templates
  *
  * @param Mage_Core_Model_Email_Template $template
  * @return boolean
  */
 public function checkCodeUsage(Mage_Core_Model_Email_Template $template)
 {
     if ($template->getTemplateActual() != 0 || is_null($template->getTemplateActual())) {
         $select = $this->_getReadAdapter()->select()->from($this->getMainTable(), 'COUNT(*)')->where('template_id != :template_id')->where('template_code = :template_code');
         $bind = array('template_id' => $template->getId(), 'template_code' => $template->getTemplateCode());
         $result = $this->_getReadAdapter()->fetchOne($select, $bind);
         if ($result) {
             return true;
         }
     }
     return false;
 }
开发者ID:njaeger,项目名称:magento_github,代码行数:18,代码来源:Template.php

示例3: testSendTransactional

 public function testSendTransactional()
 {
     $this->_model->sendTransactional('customer_create_account_email_template', array('name' => 'Sender Name', 'email' => 'sender@example.com'), 'recipient@example.com', 'Recipient Name');
     $this->assertEquals('customer_create_account_email_template', $this->_model->getId());
     $this->assertTrue($this->_model->getSentSuccess());
 }
开发者ID:natxetee,项目名称:magento2,代码行数:6,代码来源:TemplateTest.php

示例4: addTemplateToConfig

 public function addTemplateToConfig(Mage_Core_Model_Email_Template $template, $templateCode = '', $scope = '', $scopeId = null)
 {
     if (!$templateCode) {
         $templateCode = Mage::app()->getRequest()->getParam('templatecode');
     }
     try {
         if (is_null($scopeId)) {
             list($scope, $scopeId) = $this->_getCurrentScope();
         }
         $oReq = Mage::app()->getFrontController()->getRequest();
         if ($scope) {
             $templatePath = Mage::helper('aitemails')->getPathByEmailTemplateCode($templateCode);
             if ($templatePath) {
                 Mage::getConfig()->saveConfig($templatePath, $template->getId(), $scope, $scopeId);
                 Mage::getConfig()->reinit();
                 Mage::app()->reinitStores();
                 //$this->_getRulerResource()->markConfig($configDataModel);
             }
         }
     } catch (Exception $exc) {
     }
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:22,代码来源:Aitemails.php


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