Versions Compared

Key

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

...

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

	public function getEvents()
	{
		return array([
			array([
				'event' => "Appcontroller.preAction",
				'callback' => array("this", "run")
			)]
			// Add multipleadditional events here
		)];
	}

	public function run($event) 
	{
		// This will execute when the "Appcontroller.preAction" event is triggered
	}
}

...