public function is_related($query) {
        if (parent::is_related($query)) {
            return true;
        }
        $formats = core_plugin_manager::instance()->get_plugins_of_type('format');
        foreach ($formats as $format) {
            if (strpos($format->component, $query) !== false ||
                    strpos(core_text::strtolower($format->displayname), $query) !== false) {
                return true;
            }
        }
        return false;
    }
public function is_related($query) {
        if (parent::is_related($query)) {
            return true;
        }
        $formats = core_plugin_manager::instance()->get_plugins_of_type('format');
        foreach ($formats as $format) {
            if (strpos($format->component, $query) !== false ||
                    strpos(core_text::strtolower($format->displayname), $query) !== false) {
                return true;
            }
        }
        return false;
    }
public function is_related ( $ query ) { if ( parent :: is_related ( $ query ) ) { return true ; } $ formats = core_plugin_manager :: instance ( ) -> get_plugins_of_type ( 'format' ) ; foreach ( $ formats as $ format ) { if ( strpos ( $ format -> component , $ query ) !== false || strpos ( core_text :: strtolower ( $ format -> displayname ) , $ query ) !== false ) { return true ; } } return false ; }
Search to find if Query is related to format plugin

@param string $query The string to search for
@return bool true for related false for not
Search to find if Query is related to format plugin