Admin Boxes are built on static YAML files, written in TUIX, which describe and give structure to their tabs and fields. The YAML files serve as a map or plan of what functionality an Admin Box has.
In order to create an Admin Box or add an element to an existing one, your module must contain one or more .yaml files in its tuix/admin_boxes
subdirectory.
In Admin Boxes the flow of the data is two-way. Your YAML files are read by the CMS on the server and turned into a PHP array, which then passes them to the client as JSON. The client then passes the JSON object back with some properties updated.
Throughout the process you can use your fillAdminBox(), formatAdminBox(), validateAdminBox() and saveAdminBox() to add or modify the logic and functionality.
For example, the fillAdminBox()
method can be used to load data when an Admin Box is first displayed, the validateAdminBox() method
can be used to check for errors and the saveAdminBox()
method can be used to save data.
The top level element represents your Admin Box. The code-name of your top level element is the name of your Admin Box.
This is very much like the "path" in Organizer and is called a "path" for consistency's sake, however unlike Organizer this path will only ever be one code-name long. (While you can have an Organizer panel inside a navigation element or another Organizer panel, Admin Boxes are never inside of anything.)
We recommend that you prefix your Admin Box's name with either your company's name or your module's name to avoid any possible name-clash with an Admin Box from a different developer. When you add elements to another developer's Admin Box by merging them in TUIX, you will need to use their Admin Box's name, but we recommend that you prefix anything you add with your name.