Block/Snippets.php
public function getSearchData()
    {
        try {
            $q = $this->_request->getParam('q');
            if ($q != '') {
                return [
                    'term' => $q,
                ];
            }
        } catch (\Exception $e) {
            throw $e;
        }
        return false;
    }
public function getSearchData()
    {
        try {
            $q = $this->_request->getParam('q');
            if ($q != '') {
                return [
                    'term' => $q,
                ];
            }
        } catch (\Exception $e) {
            throw $e;
        }
        return false;
    }
public function getSearchData ( ) { try { $ q = $ this -> _request -> getParam ( 'q' ) ; if ( $ q != '' ) { return [ 'term' => $ q , ] ; } } catch ( \ Exception $ e ) { throw $ e ; } return false ; }
Get Search Data

@return bool|mixed
@throws \Exception
Get Search Data