New developer features in Elentra ME 1.22
Highlights from the release
You can find below a list of highlights for significant code changes, or new additions that developers may find useful.
Events Meta data
The Core team has added a new table to store Event meta data. The table will store the Event ID, a Meta Key and a Meta Value. Moving forward, please leverage this table for adding new properties to events, rather than adding a new column in the events
table.
Please note that Events Meta Data is an ideal storage location for data. However, if you are storing complex data that has relationships, the recommendation is to create a new table. Meta is not the best solution for data that requires multiple joins of the table on itself.
Event ID: 9
Meta Key: alternate_url
Meta Value: https://something.com
Append/Remove ENUM Entries
The Core Team has etended the Migration Model to include new methods allowing developers to easily modify ENUM fields. Altering an ENUM can be problamatic and this simplifies things.
Elentra ME Hooks
Hooks allow developers to add functionality to Elentra without changing the Core codebase. Hooks give you the flexibility to extend parts of Elentra, and maintain the code in your branded editiion of the software.
The Core Team has created a basic hook system that allows you to insert calls to certain actions in a standardized way.
To implement hooks, you need create a functions-custom.inc.php
in the same directory as Elentra's functions.inc.php
file
Create your own hook
Step 1
Define your hook in Entrada_Hooks
Step 2
Navigate to the file where you want to execute your own custom code, and define a hook execution, also pass the hook any parameters that you want (single parameter, or array of parameters)
Step 3
Navigate to functions-custom.inc.php
and add an action to the hook
Temporary Storage
The Elentra Corporation has added a new location to store temporary data. It is highly recommended that you create this new folder on your staging and production servers in /var/www/vhosts/host/storage/tmp
Websockets
The Core Team has added Laravel Websockets to the Elentra API - Jira Ticket
Websockets open a connection through which your frontend and backend can interact in real-time. This will be used in the new Peer Instruction feature that's currently being worked on.
Working with Settings within the Laravel API
The Core team has added a service for retrieving data from the settings
table using these simple methods. Please note that this only works while working within elentra-1x-api
Settings Descriptions
A small, yet very nice improvement, the Settings table now includes a Description column. Developers are now required to add a description to explain what the setting does.
See ME-5351 for more details.
Last updated