public function setColumnsSummary(array $columns, $rowCallback = null)
	{
		if ($this->hasSomeAggregationFunction()) {
			throw new DataGridException('You can use either ColumnsSummary or AggregationFunctions');
		}

		if (!empty($rowCallback)) {
			if (!is_callable($rowCallback)) {
				throw new \InvalidArgumentException('Row summary callback must be callable');
			}
		}

		$this->columnsSummary = new ColumnsSummary($this, $columns, $rowCallback);

		return $this->columnsSummary;
	}
public function setColumnsSummary(array $columns, $rowCallback = null)
	{
		if ($this->hasSomeAggregationFunction()) {
			throw new DataGridException('You can use either ColumnsSummary or AggregationFunctions');
		}

		if (!empty($rowCallback)) {
			if (!is_callable($rowCallback)) {
				throw new \InvalidArgumentException('Row summary callback must be callable');
			}
		}

		$this->columnsSummary = new ColumnsSummary($this, $columns, $rowCallback);

		return $this->columnsSummary;
	}
public function setColumnsSummary ( array $ columns , $ rowCallback = null ) { if ( $ this -> hasSomeAggregationFunction ( ) ) { throw new DataGridException ( 'You can use either ColumnsSummary or AggregationFunctions' ) ; } if ( ! empty ( $ rowCallback ) ) { if ( ! is_callable ( $ rowCallback ) ) { throw new \ InvalidArgumentException ( 'Row summary callback must be callable' ) ; } } $ this -> columnsSummary = new ColumnsSummary ( $ this , $ columns , $ rowCallback ) ; return $ this -> columnsSummary ; }
Set columns to be summarized in the end.
@param array    $columns
@param callable $rowCallback
@return \Ublaboo\DataGrid\ColumnsSummary
Set columns to be summarized in the end .