optionchanges
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
optionchanges [2025/02/25 15:23] – created admin | optionchanges [2025/02/25 17:26] (current) – admin | ||
---|---|---|---|
Line 3: | Line 3: | ||
This plugin exists to make it easy to handle changes to component options (accessed by the " | This plugin exists to make it easy to handle changes to component options (accessed by the " | ||
- | To make this easy, install the Component Options Handler plugin | + | To make this easy, install the Option Changes Plugin |
private function registerWithOptionsHandler(): | private function registerWithOptionsHandler(): | ||
Line 58: | Line 58: | ||
} | } | ||
+ | For example, UserPoints uses the following: | ||
+ | ' | ||
+ | OptionChange:: | ||
+ | ' | ||
+ | true | ||
+ | |||
+ | which relies on the use statement: | ||
+ | |||
+ | use BlackSheepResearch\Component\UserPoints\Site\Problems\OptionChange; | ||
+ | |||
+ | If you specify a static method, the plugin will simply call it. If you specify a non-static call, the plugin will create a new object - although this will not work if you use a class that requires parameters. | ||
+ | |||
+ | ===== Using the Option Changes Plugin ===== | ||
+ | |||
+ | Once you have set this up, your method will be called if any of the options are changed through the Joomla administrator interface. [[optionchanges: |
optionchanges.1740497016.txt.gz · Last modified: 2025/02/25 15:23 by admin