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

        $found = false;
        $filternames = filter_get_all_installed();
        foreach ($filternames as $path => $strfiltername) {
            if (strpos(core_text::strtolower($strfiltername), $query) !== false) {
                $found = true;
                break;
            }
            if (strpos($path, $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) {
        global $CFG;
        if ($result = parent::search($query)) {
            return $result;
        }

        $found = false;
        $filternames = filter_get_all_installed();
        foreach ($filternames as $path => $strfiltername) {
            if (strpos(core_text::strtolower($strfiltername), $query) !== false) {
                $found = true;
                break;
            }
            if (strpos($path, $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 ) { global $ CFG ; if ( $ result = parent :: search ( $ query ) ) { return $ result ; } $ found = false ; $ filternames = filter_get_all_installed ( ) ; foreach ( $ filternames as $ path => $ strfiltername ) { if ( strpos ( core_text :: strtolower ( $ strfiltername ) , $ query ) !== false ) { $ found = true ; break ; } if ( strpos ( $ path , $ query ) !== false ) { $ found = true ; break ; } } if ( $ found ) { $ result = new stdClass ; $ result -> page = $ this ; $ result -> settings = array ( ) ; return array ( $ this -> name => $ result ) ; } else { return array ( ) ; } }
Searches all installed filters for specified filter

@param string $query The filter(string) to search for
@param string $query
Searches all installed filters for specified filter