コード例 #1
0
ファイル: DataModel.php プロジェクト: ublaboo/datagrid
 /**
  * Filter one row
  * @param  array $condition
  * @return mixed
  */
 public function filterRow(array $condition)
 {
     return $this->data_source->filterOne($condition)->getData();
 }
コード例 #2
0
 /**
  * @param  IDataSource $dataSource
  * @return void
  */
 public function afterDataModelPaginated(IDataSource $dataSource)
 {
     if ($this->multipleAggregationFunction) {
         if ($this->multipleAggregationFunction->getFilterDataType() === IAggregationFunction::DATA_TYPE_PAGINATED) {
             $dataSource->processAggregation([$this->multipleAggregationFunction, 'processDataSource']);
         }
         return;
     }
     foreach ($this->aggregationFunctions as $aggregationFunction) {
         if ($aggregationFunction->getFilterDataType() === IAggregationFunction::DATA_TYPE_PAGINATED) {
             $dataSource->processAggregation([$aggregationFunction, 'processDataSource']);
         }
     }
 }