1. Go to this page and download the library: Download melisplatform/melis-core library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
melisplatform / melis-core example snippets
'interface_ordering' => array(
// reordering le left pannel of Melis Platform
'meliscore_leftmenu' => array(
'meliscore_leftmenu_identity', // identity zone first
'meliscore_leftmenu_dashboard', // acces to dashboard second
'meliscms_sitetree', // site tree 3rd
'meliscore_toolstree', // tools tree 4th
'meliscore_footer', // footer last
),
// Get the service
$melisCoreAuth = $this->getServiceManager()->get('MelisCoreAuth');
// check identity
$logged = $melisCoreAuth->hasIdentity()
// Get the services
$melisCoreAuth = $this->getServiceManager()->get('MelisCoreAuth');
$melisCoreRights = $this->getServiceManager()->get('MelisCoreRights');
if($melisCoreAuth->hasIdentity())
{
// Get the user's rights
$xmlRights = $melisCoreAuth->getAuthRights();
// Check if the user has an exclusion of access to /meliscore_dashboard
$isAccessible = $melisCoreRights->isAccessible($xmlRights,
MelisCoreRightsService::MELISCORE_PREFIX_INTERFACE,
'/meliscore_dashboard');
}
return array(
// key at the root for listing forms' order modifications
'forms_ordering' => array(
// change the order of the MelisCore email management form tool.
'meliscore_emails_mngt_tool_general_properties_form' => array(
'elements' => array(
// Name will now be first
array(
'spec' => array(
'name' => 'boe_code_name',
),
),
// "From" email will be second
array(
'spec' => array(
'name' => 'boe_from_email',
),
),
// Rest of the form's field will come in order after
),
),
),
);