Floating admin boxes (FABs) are built on static YAML files and written in TUIX. They describe and give structure to FABs' tabs and fields. The YAML files serve as a map or plan of what functionality an FAB has.
In order to create an FAB or add an element to an existing one, your module must contain one or more .yaml files in its tuix/admin_boxes
subdirectory.
In FABs the flow of the data is two-way. Your YAML files are read by Zenario on the server and turned into a PHP array, and then they are passed them to the client browser as JSON. After some interaction by the user, the client browser passes the JSON object back to the server, 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 FAB 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 the FAB itself. The codename of your top level element is the name of the FAB.
This codename is called a "path", like the "path" in Organizer. But unlike in Organizer an FAB's path will only ever be one code-name long. (There is no deep hierarchy).
We recommend that third party developers prefix each FAB's name with their company's name to avoid any possible name clash with an FAB 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 FAB's name, but we recommend that you prefix anything you add with your name.