User Tools

Site Tools


optionchanges

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
optionchanges [2025/02/25 17:13] adminoptionchanges [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 "Options" button in the top right corner). Option changes are handled by Joomla and without a change handler, your component does not know they have happened. For some changes, this does not matter. But for others, you need to take some action when an option changes. This plugin exists to make it easy to handle changes to component options (accessed by the "Options" button in the top right corner). Option changes are handled by Joomla and without a change handler, your component does not know they have happened. For some changes, this does not matter. But for others, you need to take some action when an option changes.
  
-To make this easy, install the Component Options Handler plugin and publish it. To make it work for you, add some code to your component install script. It is conveniently done as a method and you can use it with minimal changes:+To make this easy, install the Option Changes Plugin and publish it. To make it work for you, add some code to your component install script. It is conveniently done as a method and you can use it with minimal changes:
  
  private function registerWithOptionsHandler(): bool  private function registerWithOptionsHandler(): bool
Line 71: Line 71:
 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. 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 Change Plugin =====+===== 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:handlingchanges | This page tells you how to use the information provided]], including a number of examples. Once you have set this up, your method will be called if any of the options are changed through the Joomla administrator interface. [[optionchanges:handlingchanges | This page tells you how to use the information provided]], including a number of examples.
optionchanges.1740503587.txt.gz · Last modified: 2025/02/25 17:13 by admin