class ContentSyncEvents in Content Synchronization 8
Same name and namespace in other branches
- 8.2 src/EventSubscriber/ContentSyncEvents.php \Drupal\content_sync\EventSubscriber\ContentSyncEvents
- 3.0.x src/EventSubscriber/ContentSyncEvents.php \Drupal\content_sync\EventSubscriber\ContentSyncEvents
Create a content subscriber.
Hierarchy
- class \Drupal\content_sync\EventSubscriber\ContentSyncEvents implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
Expanded class hierarchy of ContentSyncEvents
File
- src/
EventSubscriber/ ContentSyncEvents.php, line 14
Namespace
Drupal\content_sync\EventSubscriberView source
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContentSyncEvents:: |
public static | function | Registers the methods in this class that should be listeners. | |
ContentSyncEvents:: |
public | function | This method is called whenever the EntityTypeEvents::CREATE event is dispatched. |