
| Current Path : /var/www/html_old/abk/web/modules/contrib/content_sync/src/EventSubscriber/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html_old/abk/web/modules/contrib/content_sync/src/EventSubscriber/ContentSyncEvents.php |
<?php
namespace Drupal\content_sync\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\Core\Entity\EntityTypeEvents;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeEvent;
/**
* Create a content subscriber.
*/
class ContentSyncEvents implements EventSubscriberInterface {
/**
* This method is called whenever the EntityTypeEvents::CREATE event is

* dispatched.
*
* @param \Drupal\Core\Entity\EntityTypeEvent $event
* The Event to process.
*/
public function onContentSyncCreate(EntityTypeEvent $event) {
kint($event);
\Drupal::logger('content_sync')->notice("Create Event");
}
/**
* Registers the methods in this class that should be listeners.
*
* @return array
* An array of event listener definitions.
*/
public static function getSubscribedEvents() {
$events[EntityTypeEvents::CREATE][] = ['onContentSyncCreate', 40];
return $events;
}
}