Search\Manager::collection PHP Method

collection() public method

Sets or gets the filter collection name.
public collection ( string | null $name = null ) : mixed
$name string | null Name of the active filter collection to set.
return mixed Returns $this or the name of the active collection if no $name was provided.
    public function collection($name = null)
    {
        if ($name === null) {
            return $this->_collection;
        }
        if (!isset($this->_filters[$name])) {
            $this->_filters[$name] = [];
        }
        $this->_collection = $name;
        return $this;
    }