public function search($query) {
        if ($result = parent::search($query)) {
            return $result;
        }

        $found = false;

        foreach (core_component::get_plugin_list($this->subtype) as $name => $notused) {
            if (strpos(core_text::strtolower(get_string('pluginname', $this->subtype . '_' . $name)),
                    $query) !== false) {
                $found = true;
                break;
            }
        }
        if ($found) {
            $result = new stdClass();
            $result->page     = $this;
            $result->settings = array();
            return array($this->name => $result);
        } else {
            return array();
        }
    }
public function search($query) {
        if ($result = parent::search($query)) {
            return $result;
        }

        $found = false;

        foreach (core_component::get_plugin_list($this->subtype) as $name => $notused) {
            if (strpos(core_text::strtolower(get_string('pluginname', $this->subtype . '_' . $name)),
                    $query) !== false) {
                $found = true;
                break;
            }
        }
        if ($found) {
            $result = new stdClass();
            $result->page     = $this;
            $result->settings = array();
            return array($this->name => $result);
        } else {
            return array();
        }
    }
public function search ( $ query ) { if ( $ result = parent :: search ( $ query ) ) { return $ result ; } $ found = false ; foreach ( core_component :: get_plugin_list ( $ this -> subtype ) as $ name => $ notused ) { if ( strpos ( core_text :: strtolower ( get_string ( 'pluginname' , $ this -> subtype . '_' . $ name ) ) , $ query ) !== false ) { $ found = true ; break ; } } if ( $ found ) { $ result = new stdClass ( ) ; $ result -> page = $ this ; $ result -> settings = array ( ) ; return array ( $ this -> name => $ result ) ; } else { return array ( ) ; } }
Search plugins for the specified string

@param string $query The string to search for
@return array
Search plugins for the specified string