Plugin files: Difference between revisions
From MoodleDocs
(added Category:Plugins) |
David Mudrak (talk | contribs) m (Mudrd8mz moved page Things that work the same in all plugin types to Plugin files: Shorten URL) |
(No difference)
|
Revision as of 08:19, 30 April 2015
There are some files that work the same in all plugin types (if they are present). We document them here.
- version.php
- give metadata about the plugin, like the version number.
- lang/en/plugintype_pluginname.php
- strings for your plugin, at least 'pluginname' must be present
- db/
- this folder contains information that is used to install the plugin.
- install.xml
- upgrade.php
- install.php
- These three files are to do with creating the and updating the database tables required by your plugin.
- access.php
- This is where you define any capabilities that your plugin uses.
- ...
- There are lots of other things that can go in the db folder, but I don't have time to describe them now.
- classes/
- This folder contains the definition of any classes for your plugin that you want the auto-loader to be able to find. You can define any classes you like at the top level.
- [core API name]
- within classes/, the top level folders are reserved for the names of Core APIs except for
- local/
- You can put whatever you like within the local namespace, including as many nested namespaces as you like.
- question/bank/
- This is where you define new question bank column types. See mod_quiz as an example.