Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Finally, my_plugin_plugin.php is a special class that must extend the Plugin class of /components/plugins/lib/plugin.php. This class is used for installing, upgrading, uninstalling, and branding the plugin.

Installation Logic

If your plugin requires any code to execute when installed, place that logic in your plugin's install() method.

Code Block
languagephp
title/plugins/my_plugin/my_plugin_plugin.php
linenumberstrue
<?php
class MyPluginPlugin {

    ...

    public function install() {
        // Place installation logic here
    }
}
?>
Info
titleNeed access to the database?

See how you can use the Record component to manipulate the database in the Database Access section of this manual.