Site methods
Site methods are registered with the siteMethods
extension.
Default site methods
For a full list of default site methods, please check out the Reference.
Be aware that you cannot override these default site methods with any custom site method.
Getting started
You can extend the set of defined site methods very easily in a plugin file.
This example shows the basic architecture of a site method. You define the method name with the key for the siteMethods
array. $this
in the callback function is the $site
object.
Working with method arguments
In some cases it might be helpful to be able to pass arguments to the method:
The definition for such a method with arguments is very straightforward: