Gold/Docs/Anatomy of a Search Plugin
From Mahara Wiki
< User:Gold | DocsRevision as of 09:46, 19 May 2021 by Gold (Initial WIP on documenting a search plugin.)
This is intended to become a developer reference.
How to get your plugin seen by the system
The Plugin will live in the
htdocs/search directory and needs to extend the
PluginSearch class. As with all Mahara plugins the class is loaded from/lives in the
lib.php file in the plugin directory.
htdocs/search/Mysearch ├── lib │ └── PluginSearchMysearch.php ├── lib.php └── version.php
To keep things tidy we are adding a
lib directory where the class files will live. This isn't strictly needed, but if your plugin is going to create multiple classes this is a way to keep the line count per file down to a manageable level. If you are only going to need one class though, skip this and just add it to the
The following methods need to be implemented by your Plugin.
get_plugin_display_name()to give your plugin a human readable name.