Skip to content

Conversation

@jdreesen
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no

Currently, the “Details” modal only contains a print_r of the message. Sometimes, however, it is desirable to present the content better. For this purpose, a MessageDetailsEvent has been introduced, which can be used to manipulate the displayed data.

Here is an example for a message that contains XML:

#[AsEventListener('coreshop.messenger.message_details')]
class MyMessageDetailsListener
{
    public function __invoke(MessageDetailsEvent $event): void
    {
        if ('my_receiver' === $event->getReceiverName()) {
            $xml = $event->getEnvelope()->getMessage()->xml;

            $event->getMessageDetails()->setSerialized('<pre>'.htmlentities($xml).'</pre>');
        }
    }
}

@jdreesen jdreesen changed the base branch from 4.1 to 3.2 June 19, 2025 14:01
@github-actions
Copy link

github-actions bot commented Jun 19, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@jdreesen
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@sonarqubecloud
Copy link

@dpfaffenbauer dpfaffenbauer self-requested a review June 20, 2025 05:50
@dpfaffenbauer dpfaffenbauer added this to the 3.2.18 milestone Jun 20, 2025
@dpfaffenbauer dpfaffenbauer merged commit 0d0e951 into coreshop:3.2 Jun 20, 2025
4 of 5 checks passed
@dpfaffenbauer
Copy link
Member

@jdreesen thank you very much :)

@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2025
@jdreesen jdreesen deleted the feat/message-details-event branch June 20, 2025 07:32
@dpfaffenbauer dpfaffenbauer modified the milestones: 3.2.18, 3.2.19 Jun 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants