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


PHP EmailTemplate::getSubset方法代码示例

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


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

示例1: getEmailTemplatesByPartialName

 /**
  * @param $partialName
  * @param $pageSize
  * @param null|string $moduleClassName
  * @param null|string $type
  * @return Array of SavedReport models
  */
 public static function getEmailTemplatesByPartialName($partialName, $pageSize, $modelClassName = null, $type = null)
 {
     $searchAttributeData = array();
     $searchAttributeData['clauses'] = array(1 => array('attributeName' => 'type', 'operatorType' => 'equals', 'value' => intval($type)), 2 => array('attributeName' => 'modelClassName', 'operatorType' => 'equals', 'value' => $modelClassName), 3 => array('attributeName' => 'isDraft', 'operatorType' => 'equals', 'value' => intval(false)), 4 => array('attributeName' => 'name', 'operatorType' => 'contains', 'value' => $partialName));
     $searchAttributeData['structure'] = '1 and 2 and 3 and 4';
     $joinTablesAdapter = new RedBeanModelJoinTablesQueryAdapter('EmailTemplate');
     $where = RedBeanModelDataProvider::makeWhere('EmailTemplate', $searchAttributeData, $joinTablesAdapter);
     return EmailTemplate::getSubset($joinTablesAdapter, null, $pageSize, $where, 'name');
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:16,代码来源:EmailTemplateSearch.php

示例2: run

 public function run()
 {
     $timestamp = time() - static::DRAFT_LIFE_TIME_IN_DAYS * 24 * 60 * 60;
     $dateTime = DateTimeUtil::convertTimestampToDbFormatDateTime($timestamp);
     $searchAttributeData = array();
     $searchAttributeData['clauses'] = array(1 => array('attributeName' => 'createdDateTime', 'operatorType' => 'lessThan', 'value' => $dateTime), 2 => array('attributeName' => 'isDraft', 'operatorType' => 'equals', 'value' => 1));
     $searchAttributeData['structure'] = '1 and 2';
     $joinTablesAdapter = new RedBeanModelJoinTablesQueryAdapter('EmailTemplate');
     $where = RedBeanModelDataProvider::makeWhere('EmailTemplate', $searchAttributeData, $joinTablesAdapter);
     $models = EmailTemplate::getSubset($joinTablesAdapter, null, null, $where, null);
     foreach ($models as $model) {
         $model->delete();
     }
     return true;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:15,代码来源:DraftEmailTemplateCleanupJob.php


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