PHP code example of melisplatform / melis-cms-prospects

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


return array(
	'plugins' => array(

		// MelisCmsProspects array
		'melistoolprospects' => array(

			// Form key
			'forms' => array(

				// MelisCmsProspects update form
				'melistoolprospects_tool_prospects_update' => array(
					'attributes' => array(
						'name' => 'prospectmanager',
						'id' => 'idformprospectdata',
						'method' => 'POST',
						'action' => '',
					),
					'hydrator'  => 'Laminas\Hydrator\ArraySerializableHydrator',
					'elements' => array(
						array(
							'spec' => array(
								...
							),
						),
					),
					'input_filter' => array(
						'pros_id' => array(
							...
						),
					),
				),
			),
		),
	),
),

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

	$callBackHandler = $sharedEvents->attach(
		'MelisCmsProspects',
		array(
			'meliscmsprospects_toolprospects_save_end',
		),
		function($e){

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

    		// Custom code
    	},
    100);

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