๐ฉโ๐ Custom Actions
Besides the built-in actions, you are free to extend them as you like. Before diving in, make sure to check the Custom Script documentation, as the following example requires custom server.js file.
Creating the class
All classes must extend the \RenokiCo\Clusteer\Actions\Action
class and implement the \RenokiCo\Clusteer\Contracts\Actionable
interface.
When processing your action, it requires the input data (such as what it should do), and on the other side, the formatted data that will be sent to the script is going to be placed in a format()
method:
One last thing is to check our server.js
file and add a new option to handle the action called type-emoji
:
In your PHP code, you may invoke the action()
method. Additionally, all classes that extend the Action
class will have a static new
method that's useful:
Last updated