Replies: 3 comments 4 replies
-
I would consider that as a bug, if it doesn't work... |
Beta Was this translation helpful? Give feedback.
-
For all of you waiting for the fix of https://github.com/pimcore/pimcore/issues/17382 I created a temporary workaround. After the request data has been build, an event is triggered. Create event listener <?php
declare(strict_types=1);
namespace App\EventListener;
use Pimcore\Bundle\AdminBundle\DataObject\GridColumnConfig\Operator\Alias;
use Pimcore\Event\Model\DataObjectEvent;
use Pimcore\Model\DataObject\Service;
class WebhookDataObjectAliasMapListener
{
public function __invoke(DataObjectEvent $event): void
{
$arguments = $event->getArguments();
$objectData = [];
foreach ($arguments['fields'] ?? [] as $field) {
$key = $field['key'];
$value = $arguments['objectData'][$key];
if (Service::isHelperGridColumnConfig($key)) {
$helper = Service::getConfigForHelperDefinition($arguments['helperDefinitions'], $key);
if ($helper instanceof Alias) {
$key = $helper->getLabel();
}
}
$objectData[$key] = $value;
}
$event->setArgument('objectData', $objectData);
}
} Configure event listener services:
App\EventListener\WebhookDataObjectAliasMapListener:
tags:
- { name: kernel.event_listener, event: pimcore.dataobject.postCsvItemExport } Clear cache … This may have an impact on other services too. |
Beta Was this translation helpful? Give feedback.
-
@fashxp What's going on with this issue? When I try open the link https://github.com/pimcore/pimcore/issues/17382, I get a message: This issue has been moved to a repository you don't have access to. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to configure a nice webhook inside the Pimcore Datahub. I want to rename properties in a data object. For this I used the "Operator Alias" like that:
I expected to receive a request like this:
but got this:
What I am doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions