public function setAutocompleterCallback(callable $callback = null): self
    {
        if ($this->hidden && null !== $callback) {
            throw new LogicException('A hidden question cannot use the autocompleter.');
        }

        $this->autocompleterCallback = $callback;

        return $this;
    }
public function setAutocompleterCallback(callable $callback = null): self
    {
        if ($this->hidden && null !== $callback) {
            throw new LogicException('A hidden question cannot use the autocompleter.');
        }

        $this->autocompleterCallback = $callback;

        return $this;
    }
public function setAutocompleterCallback ( callable $ callback = null ) : self { if ( $ this -> hidden && null !== $ callback ) { throw new LogicException ( 'A hidden question cannot use the autocompleter.' ) ; } $ this -> autocompleterCallback = $ callback ; return $ this ; }
Sets the callback function used for the autocompleter.

The callback is passed the user input as argument and should return an iterable of corresponding suggestions.

@return $this
Sets the callback function used for the autocompleter .