The studio module allows administrator users to quickly create their own modules. It generates a number of files in the
www/go/modules subdirectory. This module is specifically aimed at developers and resellers who wish to add non-standard
functionality within GroupOffice
The studio module has no particular dependencies from other modules. It is part of the professional package and will run in GroupOffice versions 6.4 or newer.
Out of the box, a module will have plenty of functions and options though.
Please make sure that the ownership for at least the
www/go/modules subdirectory is set to the Apache or
nginx user. In the case of Debian or Ubuntu, this is commonly www-data. The www-data user must have write permissions
www/go/modules subdirectory. This is commonly the case, but you should double check just in case.
This workflow is to be accompanied by a fictional example of Intermesh lunch management.
Creating a module is done in a few steps.
- Open the studio module and click on the ‘Plus’ button on top of the grid;
- Fill in the module data;
- Add custom fields;
- Add ACL data;
- Enter frontend options;
- Confirm your choices
Create a Module¶
The following fields need to be entered. This step can be run only once for each module, so make sure that you enter the correct data:
|Name||The name of the module|
|Package||The package name. This allows you to group your modules.|
|Description||A description to be displayed in the modules manager|
|Sort order||Makes modules sortable by your own preference|
|Entity name||The name of the database object.|
|ACL Entity||Enables access control for your entities|
Upon finishing this step, a database migration script will be generated for the module, a number of PHP files is
generated and the module is saved into the
www/go/modules/PACKAGE/NAME/ subdirectory. Subsequently, the module is
Trying to install a studio module into business or community generate an error message.
It is not possible to save two different entities with the same name.
Add Custom Fields¶
A feature of studio is that almost every field is stored as a custom field. After all, the entire module is custom! This works in exactly the same way as for standard modules.
The permissions for studio modules work are straightforward and work in a standard way.
Since the database objects are saved as entities, one can enter code generation options for the model:
|Search Name Field||Generates the search name for a certain entity|
|Search description fields||Generate search descriptions based on fields.|
|Auto expand field||Configure the name of the column to be automatically expanded in the grid|
This step enables you to generate the actual screens and is arguably the most interesting step for the end user.
|Display detail panel||Toggles the right panel within the grid|
|Display search bar||Toggle search bar on top of the grid.|
|Display totals||Toggles the sum of total items in the grid|
|Enable CSV||Toggles the CSV import and export functions|
|Toggle ID||Toggles the display of the ID in the grid|
|Show creator and modifier||Toggles the display of creation and modification information in the grid|
|Display links||Enables or disables :ref:<links> on top of the detail panel|
|Display comments||Enables or disables comments in the detail panel|
|Display file uploads||Enables or disables file uploads from the detail panel|
|Display modification info||Toggles creation and modification date in the detail panel|
If you want to toggle certain frontend options, you can directly edit this file, thereby preventing any overwrites
of custom code.
This is the point that makes you want to evaluate your choices. You will now overwrite any generated code. If you have any self-written code in your module, you will lose it unless you have a backup ready.
The ‘Enable module’ will make the module available for your end users. You may want to disable it if you wish to do some custom editing. In that case, you can re-enable it from the System Settings.
You can disable Studio for your module by ticking the ‘Lock code generation’ checkbox. This is particularly useful for manual changes to the code. Upon saving, a studio module can not be regenerated.
In order to finish the workflow, you must check the ‘Overwrite existing code’ checkbox. This will re-generate all code and throw away any and all manual additions to the code. By clicking finish, code generation will be initialized.
Removing a studio record will not delete the module. It will merely disable the regeneration of code in a very thorough way.
The Generated Screens¶
The overview of objects of a certain type in a table is called a grid. By default, a generated grid looks like below:
Single items are displayed right of the grid in a so-called detail panel. Please note that you can disable the detail panel. In that case, you can only display items in a grid.
The dialog for editing items looks like the screen shot above.