PHP code example of heimrichhannot / contao-participation

1. Go to this page and download the library: Download heimrichhannot/contao-participation 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/ */

    

heimrichhannot / contao-participation example snippets


$GLOBALS['TL_PARTICIPATION']['news'] = array
(
	'tl_news' => 'NewsParticipationConfig'
);


$GLOBALS['TL_PARTICIPATION_DATA'] = array
(
	'member' => array
	(
		'tl_member'   => 'ParticipationDataMyMemberConfig',
	)
);

class ParticipationDataMyMemberConfig extends ParticipationDataMemberConfig
{
	protected function getSourceOptionValue(\Model $objSource)
	{
		return $objSource->firstname . ' ' . $objSource->lastname . ' [ID: ' . $objSource->id . ']';
	}
}