Defining Buttons

Buttons appear in sections in the Admin Toolbar.

They are intended to be for actions that apply to the content item in view.

Using your own CSS for Buttons

If you want to use your own icons for buttons in the Admin Toolbar, you can include your own CSS rules by creating a directory and file called adminstyles/admin_frontend.css in your module's directory.

Any CSS class names you create should have a suitable prefix (e.g. your company name or your module's name) to avoid any possible name clashes.

Using your own JavaScript functions

If you want to use the call_js_function property and call your own JavaScript function, you can define JavaScript functions by creating a directory and file called js/admin_frontend.js in your module's directory.

As with writing JavaScript functions for plugins, any JavaScript functions you create should be added to the encapsulated object with your module's class name, which the CMS will create for you.

Reference for buttons: