PHP code example of melisplatform / melis-cms-slider

1. Go to this page and download the library: Download melisplatform/melis-cms-slider 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-cms-slider example snippets


return array(
	'plugins' => array(

		// MelisCmsNews array
		'MelisCmsSlider' => array(

			// Form key
			'forms' => array(

				// MelisCmsNews Properties form
				'MelisTechnologySlider_details_form' => array(
					'attributes' => array(
						'name' => 'sliderDetailsForm',
						'id' => 'sliderDetailsForm',
						'enctype' => "multipart/form-data",
						'method' => 'POST',
						'action' => '',
					),
					'hydrator'  => 'Laminas\Hydrator\ArraySerializableHydrator',
					'elements' => array(
						array(
							'spec' => array(
									...
							),
						),
					),
					'input_filter' => array(
						'mcsdetail_id' => array(
								...
						),
					),
				),
			),
		),
	),
),

public function attach(EventManagerInterface $events)
{
    $sharedEvents      = $events->getSharedManager();

	$callBackHandler = $sharedEvents->attach(
		'MelisCmsSlider',
		array(
			'meliscmsslider_delete_details_end',
		),
		function($e){

			$sm = $e->getTarget()->getEvent()->getApplication()->getServiceManager()
			$sm = $e->getTarget()->getEvent()->getApplication()->getServiceManager()
    		$params = $e->getParams();

    		// Custom code here

    	},
    100);

    $this->listeners[] = $callBackHandler;
}