ModelSearch::getSearchTermForAttribute PHP Method

getSearchTermForAttribute() public method

Retrieves the search term supplied by the user for a given attribute if there was one.
public getSearchTermForAttribute ( $attribute, string $default = '' ) : string
$attribute
$default string
return string
    public function getSearchTermForAttribute($attribute, $default = '')
    {
        if (array_key_exists($attribute, $this->searchTerms)) {
            return $this->searchTerms[$attribute];
        }
        return $default;
    }