Exemple #1
0
 /**
  * @param int $type OPTIONAL
  */
 public function __construct($type = null)
 {
     $where = null;
     if ($type) {
         $type = (int) $type;
         $where = '`type` = ' . $type;
     }
     $source = new CM_PagingSource_Sql('DISTINCT `actionType`, `actionVerb`, `type`', 'cm_actionLimit', $where, '`type`, `actionType`, `actionVerb`');
     $source->enableCacheLocal();
     parent::__construct($source);
 }
Exemple #2
0
 /**
  * @param CM_Action_Abstract $action
  */
 public function __construct(CM_Action_Abstract $action)
 {
     $source = new CM_PagingSource_Sql('DISTINCT `actionType`, `actionVerb`, `type`', 'cm_actionLimit', '`actionType` = ' . $action->getType() . ' AND `actionVerb` = ' . $action->getVerb(), '`type`');
     $source->enableCacheLocal();
     parent::__construct($source);
 }