yii\db\QueryTrait::limit PHP Method

limit() public method

Sets the LIMIT part of the query.
public limit ( integer $limit )
$limit integer the limit. Use null or negative value to disable limit.
    public function limit($limit)
    {
        $this->limit = $limit;
        return $this;
    }