PHP code example of mediadreams / md_eventmgt_frontend

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

    

mediadreams / md_eventmgt_frontend example snippets


namespace Vendor\Extension\EventListener;

use Mediadreams\MdNewsfrontend\Event\CreateActionBeforeSaveEvent;

final class MyListener
{
    public function enrichEvent(CreateActionBeforeSaveEvent $obj)
    {
        // Get event object
        /** @var \Mediadreams\MdEventmgtFrontend\Domain\Model\Event $event */
        $event = $obj->getEvent();
        $event->setTitle('Set some teaser...');

        // Get EventController
        /** @var \Mediadreams\MdEventmgtFrontend\Controller\EventController $controller */
        $controller = $obj->getEventController();
    }
}