public function setMaxNbColumns($maxNbColumns)
    {
        $this->minNbColumns = min($this->minNbColumns, $maxNbColumns);
        $this->maxNbColumns = $maxNbColumns;

        return $this;
    }
public function setMaxNbColumns($maxNbColumns)
    {
        $this->minNbColumns = min($this->minNbColumns, $maxNbColumns);
        $this->maxNbColumns = $maxNbColumns;

        return $this;
    }
public function setMaxNbColumns ( $ maxNbColumns ) { $ this -> minNbColumns = min ( $ this -> minNbColumns , $ maxNbColumns ) ; $ this -> maxNbColumns = $ maxNbColumns ; return $ this ; }
Sets the maximum number of columns in the grid.

The default maximum is unlimited.

@param int $maxNbColumns The maximum number of columns.

@return static The current instance.
Sets the maximum number of columns in the grid .