Blocks methods are registered with the
For a full list of default blocks methods, please check out the Reference.
Be aware that you cannot override these default blocks methods with any custom blocks method.
You can extend the set of defined blocks methods very easily in a plugin file.
This example shows the basic architecture of a blocks method. You define the method name with the key for the
$this in the callback function is the
The blocks method can be used afterwards in your code:
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 simple: