PHP code example of itk-dev / beskedfordeler-drupal
1. Go to this page and download the library: Download itk-dev/beskedfordeler-drupal 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/ */
itk-dev / beskedfordeler-drupal example snippets
# my_module/src/EventSubscriber/BeskedfordelerEventSubscriber.php;
namespace Drupal\my_module\EventSubscriber;
use Drupal\beskedfordeler\Event\PostStatusBeskedModtagEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class BeskedfordelerEventSubscriber implements EventSubscriberInterface {
public static function getSubscribedEvents() {
return [
PostStatusBeskedModtagEvent::class => 'postStatusBeskedModtag',
];
}
public function postStatusBeskedModtag(PostStatusBeskedModtagEvent $event): void {
// Do something with the event.
}
}