PHP code example of numero2 / contao-contact-persons

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

    

numero2 / contao-contact-persons example snippets


// src/EventListener/ContactPersonParseListener.php
namespace App\EventListener;

use numero2\ContactPersonsBundle\Event\ContactPersonEvents;
use numero2\ContactPersonsBundle\Event\ContactPersonParseEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener(ContactPersonEvents::CONTACT_PERSON_PARSE)]
class ContactPersonListener {

    public function __invoke( ContactPersonParseEvent $event ): void {
        // …
    }
}