Loading modules/content/src/Plugin/ECA/Event/ContentEntityEvent.php +12 −4 Original line number Diff line number Diff line Loading @@ -70,7 +70,8 @@ class ContentEntityEvent extends EventBase implements CleanupInterface { public static function definitions(): array { return [ 'bundlecreate' => [ 'label' => 'Create content entity bundle', 'label' => 'Initialize content entity bundle', 'description' => 'An entity bundle object is being created (instantiated) on runtime, without being saved.', 'event_name' => ContentEntityEvents::BUNDLECREATE, 'event_class' => ContentEntityBundleCreate::class, 'tags' => Tag::CONFIG | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, Loading @@ -82,13 +83,15 @@ class ContentEntityEvent extends EventBase implements CleanupInterface { 'tags' => Tag::CONFIG | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, ], 'create' => [ 'label' => 'Create content entity', 'label' => 'Initialize content entity', 'description' => 'An entity object is being created (instantiated) on runtime, without being saved.', 'event_name' => ContentEntityEvents::CREATE, 'event_class' => ContentEntityCreate::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::RUNTIME | Tag::AFTER, ], 'revisioncreate' => [ 'label' => 'Create content entity revision', 'label' => 'Initialize content entity revision', 'description' => 'An entity revision object is being created (instantiated) on runtime, without being saved.', 'event_name' => ContentEntityEvents::REVISIONCREATE, 'event_class' => ContentEntityRevisionCreate::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::RUNTIME | Tag::AFTER, Loading @@ -113,30 +116,35 @@ class ContentEntityEvent extends EventBase implements CleanupInterface { ], 'presave' => [ 'label' => 'Presave content entity', 'description' => 'Before a new or existing entity gets saved (persistently created or changed).', 'event_name' => ContentEntityEvents::PRESAVE, 'event_class' => ContentEntityPreSave::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::PERSISTENT | Tag::BEFORE, ], 'insert' => [ 'label' => 'Insert content entity', 'description' => 'After a new entity got saved (persistently created).', 'event_name' => ContentEntityEvents::INSERT, 'event_class' => ContentEntityInsert::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, ], 'update' => [ 'label' => 'Update content entity', 'description' => 'After an existing entity got saved (persistently changed).', 'event_name' => ContentEntityEvents::UPDATE, 'event_class' => ContentEntityUpdate::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, ], 'translationcreate' => [ 'label' => 'Create content entity translation', 'label' => 'Initialize content entity translation', 'description' => 'An entity translation object is being created (instantiated) on runtime, without being saved.', 'event_name' => ContentEntityEvents::TRANSLATIONCREATE, 'event_class' => ContentEntityTranslationCreate::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::RUNTIME | Tag::AFTER, ], 'translationinsert' => [ 'label' => 'Insert content entity translation', 'description' => 'After a new entity translation got saved (persistently created).', 'event_name' => ContentEntityEvents::TRANSLATIONINSERT, 'event_class' => ContentEntityTranslationInsert::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, Loading src/Plugin/ECA/Event/EventDeriverBase.php +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ abstract class EventDeriverBase extends DeriverBase { 'label' => $definition['label'], 'tags' => $definition['tags'] ?? 0, ] + $base_plugin_definition; if (isset($definition['description'])) { $this->derivatives[$definition_id]['description'] = $definition['description']; } } return $this->derivatives; } Loading Loading
modules/content/src/Plugin/ECA/Event/ContentEntityEvent.php +12 −4 Original line number Diff line number Diff line Loading @@ -70,7 +70,8 @@ class ContentEntityEvent extends EventBase implements CleanupInterface { public static function definitions(): array { return [ 'bundlecreate' => [ 'label' => 'Create content entity bundle', 'label' => 'Initialize content entity bundle', 'description' => 'An entity bundle object is being created (instantiated) on runtime, without being saved.', 'event_name' => ContentEntityEvents::BUNDLECREATE, 'event_class' => ContentEntityBundleCreate::class, 'tags' => Tag::CONFIG | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, Loading @@ -82,13 +83,15 @@ class ContentEntityEvent extends EventBase implements CleanupInterface { 'tags' => Tag::CONFIG | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, ], 'create' => [ 'label' => 'Create content entity', 'label' => 'Initialize content entity', 'description' => 'An entity object is being created (instantiated) on runtime, without being saved.', 'event_name' => ContentEntityEvents::CREATE, 'event_class' => ContentEntityCreate::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::RUNTIME | Tag::AFTER, ], 'revisioncreate' => [ 'label' => 'Create content entity revision', 'label' => 'Initialize content entity revision', 'description' => 'An entity revision object is being created (instantiated) on runtime, without being saved.', 'event_name' => ContentEntityEvents::REVISIONCREATE, 'event_class' => ContentEntityRevisionCreate::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::RUNTIME | Tag::AFTER, Loading @@ -113,30 +116,35 @@ class ContentEntityEvent extends EventBase implements CleanupInterface { ], 'presave' => [ 'label' => 'Presave content entity', 'description' => 'Before a new or existing entity gets saved (persistently created or changed).', 'event_name' => ContentEntityEvents::PRESAVE, 'event_class' => ContentEntityPreSave::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::PERSISTENT | Tag::BEFORE, ], 'insert' => [ 'label' => 'Insert content entity', 'description' => 'After a new entity got saved (persistently created).', 'event_name' => ContentEntityEvents::INSERT, 'event_class' => ContentEntityInsert::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, ], 'update' => [ 'label' => 'Update content entity', 'description' => 'After an existing entity got saved (persistently changed).', 'event_name' => ContentEntityEvents::UPDATE, 'event_class' => ContentEntityUpdate::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, ], 'translationcreate' => [ 'label' => 'Create content entity translation', 'label' => 'Initialize content entity translation', 'description' => 'An entity translation object is being created (instantiated) on runtime, without being saved.', 'event_name' => ContentEntityEvents::TRANSLATIONCREATE, 'event_class' => ContentEntityTranslationCreate::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::RUNTIME | Tag::AFTER, ], 'translationinsert' => [ 'label' => 'Insert content entity translation', 'description' => 'After a new entity translation got saved (persistently created).', 'event_name' => ContentEntityEvents::TRANSLATIONINSERT, 'event_class' => ContentEntityTranslationInsert::class, 'tags' => Tag::CONTENT | Tag::WRITE | Tag::PERSISTENT | Tag::AFTER, Loading
src/Plugin/ECA/Event/EventDeriverBase.php +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ abstract class EventDeriverBase extends DeriverBase { 'label' => $definition['label'], 'tags' => $definition['tags'] ?? 0, ] + $base_plugin_definition; if (isset($definition['description'])) { $this->derivatives[$definition_id]['description'] = $definition['description']; } } return $this->derivatives; } Loading