AfterRecordPublishedEvent

New in version 12.2.

The PSR-14 event \TYPO3\CMS\Workspaces\Event\AfterRecordPublishedEvent is fired after a record has been published in a workspace.

Example

Registration of the event listener in your extension's Services.yaml:

EXT:my_extension/Configuration/Service.yaml
MyVendor\MyExtension\Workspaces\MyEventListener:
  tags:
    - name: event.listener
      identifier: 'my-extension/after-record-published'

The corresponding event listener class:

EXT:my_extension/Classes/Workspaces/MyEventListener.php;
use TYPO3\CMS\Workspaces\Event\AfterRecordPublishedEvent;

final class MyEventListener {
    public function __invoke(AfterRecordPublishedEvent $event): void
    {
        // Do your magic here
    }
}

API

class TYPO3\CMS\Workspaces\Event\AfterRecordPublishedEvent

Event that is fired after a record has been published in a workspace.

getTable()

The table name of the record.

Return type

string

getRecordId()

The uid of the record

Return type

int

getWorkspaceId()

The workspace the record has been published in.

Return type

int