With bug 21073, a simple plugin implementing (say) only the to_marc method generates this on the DB: mysql> SELECT * FROM plugin_methods; +-----------------------------------------------+-------------------------------+ | plugin_class | plugin_method | +-----------------------------------------------+-------------------------------+ | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | _handle_control_field | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | _version_compare | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | abs_path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | as_heavy | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | canonpath | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | catdir | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | catfile | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | configure | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | curdir | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | except | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export_fail | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export_ok_tags | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export_tags | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export_to_level | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | file_name_is_absolute | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | get_metadata | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | get_plugin_http_path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | get_qualified_table_name | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | get_template | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | go_home | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | import | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | install | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | max | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_dir | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_exists | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_open | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_read | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_validate | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | new | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | no_upwards | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | only | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | output | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | output_html | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | output_html_with_http_headers | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | output_with_http_headers | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | plugins | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | require_version | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | retrieve_data | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | rootdir | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | search_path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | store_data | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | to_marc | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | uninstall | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | updir | +-----------------------------------------------+-------------------------------+ 47 rows in set (0.00 sec) I think plugins should just expose what methods they implement that are intended to be used in Koha, not any internal method.
Will the "interesting methods" always correspond to the plugin hooks that are in Koha? Or will there be cases where an "interesting method" is not in that list? If we are only looking for which plugin hooks a plugin implements, perhaps we could maintain a list of the hooks and filter the plugin_methods we have today against that list?
We have discussed the possibility of a whitelist before... currently we have not done that so we can support legacy plugins which implement additional workflows via `/cgi-bin/koha/plugins/run.pl?class=plugin_class&method=X`
(In reply to Tomás Cohen Arazi from comment #0) > I think plugins should just expose what methods they implement that are > intended to be used in Koha, not any internal method. Agreed. That would make it much easier to manage plugins.