Download the PHP package melisplatform/melis-core without Composer
On this page you can find all versions of the php package melisplatform/melis-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download melisplatform/melis-core
More information about melisplatform/melis-core
Files in melisplatform/melis-core
Package melis-core
Short Description Melis Platform Core module
License OSL-3.0
Homepage https://github.com/melisplatform/melis-core
Informations about the package melis-core
melis-core
MelisCore provides a full back-office platform, ready to use and accepting plenty of modules to run on top of it.
Getting Started
These instructions will get you a copy of the project up and running on your machine.
Prerequisites
You will need to install melisplatform/melis-asset-manager in order to have this module running.
This will automatically be done when using composer.
Installing
Run the composer command:
In order to get the skeleton, run the following command and bring MelisCore, MelisCms and other modules:
Access Melis Platform's setup video and documentation here
Database
Database model is accessible on the MySQL Workbench file:
/melis-core/install/sql/model
Database will be installed through composer and its hooks.
In case of problems, SQL files are located here:
/melis-core/install/sql
Tools & Elements provided
- User Management Tool
- Login & Lost Password
- Main Dashboard
- Profile
- TinyMCE Editor
- Modules Tool
- Diagnostic Tool
- Logs Tool
- Platforms Tool
- Back-Office Email Management Tool
- Back-Office Language Tool
- Microservices system
- GDPR Tool
Running the code
MelisCore's interface designing
Melis Platform is designed by following a recursive array that defines all rendered parts of the interface.
This recursive array can be found here:
/melis-core/config/app.interface.php
All modules that add content to the back office must implement this system and merge their configuration to the ZF2 config.
See Full documentation on modules and interface designing here
Reordering the children of an interface
As configuration between modules are merged with each other in the module's order, it doesn't always correspond to the actual order you'd like to be displayed.
It is possible to define a specific order by creating a key 'interface_ordering' at the root and listing children keys in a specific order:
MelisCore Services
MelisCore provides many services to be used in other modules.
Find them in the folder: /melis-core/src/Service
-
MelisCoreConfig
This service deals with the interface config files that generates the back-office interface.
All files "/config/app.interface.php" from all modules are merged together to create a big configuration.
This service will then handle it and all the specificities from MelisPlatform.
Access to the configuration only through this service as it will run many scripts (translations, melisKey, etc).
File: /melis-core/src/Service/MelisCoreConfigService.php -
MelisCoreAuthService
Gets the user's auth and validates authentication, extends ZF AuthenticationService File: /melis-core/src/Service/MelisCoreAuthService.php - MelisCoreRights
Get the rights defined for the user and adapt access to the different elements of the interface:
File: /melis-core/src/Service/MelisCoreRightsService.php
See Full documentation on rights management system here
-
MelisCoreFlashMessenger
Add logs to flash messenger and get some notifications in the back office - MelisCoreBOEmailService
File: /melis-core/src/Service/MelisCoreBOEmailService.php
Add or override emails sent from the back office to send them from your modules and manage them through a tool
See Full documentation on back-office emails here
MelisCore Forms
Forms factories
All Melis CMS forms are built using Form Factories.
All form configuration are available in the file: /melis-core/config/app.forms.php
Any module can override or add items in this form by building the keys in an array and marge it in the Module.php config creation part.
Forms elements
MelisCore provides many form elements to be used in forms:
- MelisCoreLanguageSelect: a dropdown to select a language of the platform
- MelisCoreSiteSelect: a dropdown to select a site
- MelisToggleButton: an on-off button designed for Melis Platform
- MelisText: a input field
Overriding / Adding / Changing order of the fields
Existing forms can be updated to add new fields by simply declaring the form in your module's config and update the key for your form.
To reuse the previous example, going back to the meliscore_login key, then adding new fields, eventually merged all together:
At some point, it could be a nessecity to reorder the fields for a specific project.
Declare a key 'forms_ordering' and a subkey nammed like the form.
Then just place existing elements in the order needed. No need to place all of them, start with what is reordered and stop when it's finished, other existing form elements will automatically be added at the end.
MelisCoreConfig Service provides a method called getFormMergedAndOrdered that will get the form and give it back reordered:
Listening to services and update behavior with custom code
Most services trigger events so that the behavior can be modified.
GDPR Tool
MelisCore provides a system to look for your user's data. By allowing other modules to plug / interact with it, and allow to see, extract, and delete the user's data.
Events:
melis_core_gdpr_user_info_event : This event will trigger after searching a user. Modules that are listening to this event will send back the data they
have on the user or it will stay silent if there are none.
melis_core_gdpr_user_extract_event : This event will trigger when the button "Extract Selected" button is clicked, Modules
will then format and send back whatever they have for the items selected.
melis_core_gdpr_user_delete_event : This event will trigger when the "Delete Selected" button is clicked. The items that are selected will then be deleted or updated by their respective modules.
Listening to the Events :
melis_core_gdpr_user_info_event
The parameter of this event is the form inputs.
You can have your own logic for this event as long as you will follow this structure for the value that will be returned.
The columns index is the columns that will be shown in the table. while the datas index is the rows on the table.
melis_core_gdpr_user_extract_event
The parameter of this event are the modules containing the selected ids that will be extracted.
The modules that will catch the event will then provide their own results using this structure.
melis_core_gdpr_user_delete_event
The parameter of this event are the list of modules containing all the Ids that are selected.
The modules that will catch the event will then return an acknowledgement message if the items are succesfully deleted.
Javascript helpers provided with MelisCore
Melis Helpers
Most helpers are located in the file:
/melis-core/public/js/core/melisHelper.js
- zoneReload: Reloads an html zone using the MelisKey and an ajax call
- createModal: Creates a modal and put a template inside
- melisOkNotification: generates a green notification
- melisKoNotification: generates a red notification
- tabSwitch: switches the main tabs
- tabClose: closes a tab
- tabOpen: opens a tab
- loadingZone: wraps a div in a loading design
- removeLoadingZone: removes the loading design
See Full documentation on Melis JS helpers here
TinyMCE and configurations
MelisCore brings TinyMCE as its editor and has one configuration.
TinyMCE helper is located here:
/melis-core/public/js/tinyMCE/melis_tinymce.js
Configurations:
- tool: the default config for tools that use html editor
Creating other config is possible. Add the config in a file then declare the file in the module.config.php file of the module:
See Full documentation on TinyMCE and Melis Platform here
Cache and Bundle
Cache
- Caching system is already applied in Melis platform BO, particularly in leftmenu, dashboard, dashboard plugins menu and front plugins menu.
- Clearing the cache will be done automatically by updating the user or updating the modules in module tool.
- You can also disable the caching system inside platform tool.
Bundle
- Melis platform improved its bundling system by loading one file instead of every file in each module.
- You can re-bundle all assets inside the Module tool.
- To disable/enable bundle per platform, you can override it inside the MelisModuleConfig interface:
Authors
- Melis Technology - www.melistechnology.com
See also the list of contributors who participated in this project.
License
This project is licensed under the OSL-3.0 License - see the LICENSE.md file for details
All versions of melis-core with dependencies
ext-intl Version *
ext-json Version *
ext-openssl Version *
ext-pdo_mysql Version *
composer/composer Version 2.5.8
laminas/laminas-mvc Version ^3.7
laminas/laminas-i18n Version ^2.24
laminas/laminas-session Version ^2.17
laminas/laminas-form Version ^3.17
laminas/laminas-hydrator Version ^4.15
laminas/laminas-mvc-i18n Version ^1.8
laminas/laminas-db Version ^2.19
laminas/laminas-authentication Version ^2.16
laminas/laminas-servicemanager Version 3.22.1
laminas/laminas-mail Version ^2.25
laminas/laminas-mime Version ^2.12
laminas/laminas-inputfilter Version ^2.28
laminas/laminas-file Version ^2.13
laminas/laminas-crypt Version ^3.11
laminas/laminas-cache Version ^3.12
laminas/laminas-cache-storage-adapter-filesystem Version ^2.3
symfony/var-dumper Version ^6.4
laminas/laminas-developer-tools Version ^2.8
laminas/laminas-development-mode Version ^3.12
laminas/laminas-serializer Version 2.17
laminas/laminas-paginator Version ^2.18
symfony/service-contracts Version 2.5.0
psr/container Version 1.1.1
justinrainbow/json-schema Version ^5.2.13
matthiasmullie/minify Version ^1.3
melisplatform/melis-asset-manager Version ^5.2
melisplatform/melis-composerdeploy Version ^5.2
melisplatform/melis-dbdeploy Version ^5.2