public function search($searchtext, $page = 0) {
        $path = $this->build_node_path('root', get_string('pluginname', 'repository_googledocs'));
        $str = get_string('searchfor', 'repository_googledocs', $searchtext);
        $path = $this->build_node_path('search', $str, $path);

        // Query the Drive.
        $q = "fullText contains '" . str_replace("'", "\'", $searchtext) . "'";
        $q .= ' AND trashed = false';
        $results = $this->query($q, $path);

        $ret = array();
        $ret['dynload'] = true;
        $ret['path'] = $this->build_breadcrumb($path);
        $ret['list'] = $results;
        $ret['manage'] = 'https://drive.google.com/';
        return $ret;
    }
public function search($searchtext, $page = 0) {
        $path = $this->build_node_path('root', get_string('pluginname', 'repository_googledocs'));
        $str = get_string('searchfor', 'repository_googledocs', $searchtext);
        $path = $this->build_node_path('search', $str, $path);

        // Query the Drive.
        $q = "fullText contains '" . str_replace("'", "\'", $searchtext) . "'";
        $q .= ' AND trashed = false';
        $results = $this->query($q, $path);

        $ret = array();
        $ret['dynload'] = true;
        $ret['path'] = $this->build_breadcrumb($path);
        $ret['list'] = $results;
        $ret['manage'] = 'https://drive.google.com/';
        return $ret;
    }
public function search ( $ searchtext , $ page = 0 ) { $ path = $ this -> build_node_path ( 'root' , get_string ( 'pluginname' , 'repository_googledocs' ) ) ; $ str = get_string ( 'searchfor' , 'repository_googledocs' , $ searchtext ) ; $ path = $ this -> build_node_path ( 'search' , $ str , $ path ) ; // Query the Drive. $ q = "fullText contains '" . str_replace ( "'" , "\'" , $ searchtext ) . "'" ; $ q .= ' AND trashed = false' ; $ results = $ this -> query ( $ q , $ path ) ; $ ret = array ( ) ; $ ret [ 'dynload' ] = true ; $ ret [ 'path' ] = $ this -> build_breadcrumb ( $ path ) ; $ ret [ 'list' ] = $ results ; $ ret [ 'manage' ] = 'https://drive.google.com/' ; return $ ret ; }
Search throughout the Google Drive.

@param string $searchtext text to search for.
@param int $page search page.
@return array of results.
Search throughout the Google Drive .