public function setMaxResults($maxResults = null)
    {
        if ((is_int($maxResults) && $maxResults < 0) && $maxResults !== null) {
            throw new \InvalidArgumentException(self::NOT_VALID_MAX_RESULT_EX_MSG);
        }

        $this->maxResults = $maxResults;

        return $this;
    }
public function setMaxResults($maxResults = null)
    {
        if ((is_int($maxResults) && $maxResults < 0) && $maxResults !== null) {
            throw new \InvalidArgumentException(self::NOT_VALID_MAX_RESULT_EX_MSG);
        }

        $this->maxResults = $maxResults;

        return $this;
    }
public function setMaxResults ( $ maxResults = null ) { if ( ( is_int ( $ maxResults ) && $ maxResults < 0 ) && $ maxResults !== null ) { throw new \ InvalidArgumentException ( self :: NOT_VALID_MAX_RESULT_EX_MSG ) ; } $ this -> maxResults = $ maxResults ; return $ this ; }
Sets the max results of the grid.

@param int $maxResults

@throws \InvalidArgumentException

@return self
Sets the max results of the grid .