Studio Pre-Response Events
Portal Engine builds its Pimcore Studio responses through the Pimcore Studio Backend Bundle. Before a response is returned, it dispatches a pre-response event carrying the response object, so you can attach your own data without replacing the controller or the service behind it.
See Additional and Custom Attributes in the Studio Backend Bundle documentation for how additional attributes reach the Studio frontend. For the events Portal Engine dispatches outside Studio, see Events.
All event classes live under Pimcore\Bundle\PortalEngineBundle\Event\PreResponse\. The payload column names the
class passed to the event constructor, relative to Pimcore\Bundle\PortalEngineBundle\.
The Studio endpoints that dispatch these events are marked @internal and change without deprecation. Listen to the
events, but do not call the endpoints from your own code. Studio Backend serves the generated API reference at
/pimcore-studio/api/docs.
Index Management
| Event name | Payload | Dispatched when |
|---|---|---|
pre_response.portal_engine.index_stat | Schema\IndexManagement\IndexStat | Once per index, while the index statistics listing is built |
pre_response.portal_engine.queue_item_count | Schema\IndexManagement\QueueItemCount | When the indexing queue backlog count is requested |
Portal Setup Wizard
| Event name | Payload | Dispatched when |
|---|---|---|
pre_response.portal_engine.wizard_custom_layout | Schema\Wizard\CustomLayout | Once per selectable custom layout offered by the wizard |
pre_response.portal_engine.wizard_format | Schema\Wizard\Format | Once per available download or output format |
pre_response.portal_engine.wizard_thumbnail | Schema\Wizard\Thumbnail | Once per selectable thumbnail configuration |
pre_response.portal_engine.wizard_start | Schema\Wizard\WizardStartResponse | When the wizard starts and returns its session key |
pre_response.portal_engine.wizard_status | Schema\Wizard\WizardStatusResponse | Each time the wizard's progress is polled |
Collections
| Event name | Payload | Dispatched when |
|---|---|---|
pre_response.portal_engine.collection | Schema\Collection\Collection | On the collection listing, and on create and update |
pre_response.portal_engine.collection_portal | Schema\Collection\Portal | Once per portal in the portal picker used for collections |
pre_response.portal_engine.collection_share_list_item | Schema\Collection\ShareListItem | Once per entry of a collection's share list |
pre_response.portal_engine.collection_user_group | Schema\Collection\UserGroup | Once per user and user group returned by the share user search |
pre_response.portal_engine.collection_tree_information | Schema\Collection\Tree\Information | When the tree metadata for a collection is requested |
pre_response.portal_engine.collection_tree_node | Schema\Collection\Tree\Folder | Once per root folder node of a collection tree. The asset and object nodes below a folder are returned without dispatching this event |
pre_response.portal_engine.user_assignment_check | Schema\Collection\UserAssignment | When it is checked whether a user may be assigned to a collection |
Events dispatched once per entry run for every item in the list, not once for the whole response.
TreeNodeEvent declares a wider constructor union than it is ever called with:
Schema\Collection\Tree\Folder|Schema\Collection\Tree\Asset|Service\DataPool\DataObject. The only dispatch site,
TreeService::getFoldersForRoot(), passes the result of the tree folder hydrator, so a listener always receives
Schema\Collection\Tree\Folder. Type against Folder rather than against the declared union.