<?php
namespace App\EventListener;
class AdminStyleListener
{
public function onResolveElementAdminStyle(\Pimcore\Event\Admin\ElementAdminStyleEvent $event)
{
$element = $event->getElement();
// decide which default styles you want to override
if (get_class($element) == "Pimcore\Model\DataObject\Product") {
$event->setAdminStyle(new \App\Model\Product\AdminStyle\Product($element));
}
// else if (get_class($element) == "Pimcore\Model\DataObject\Folder") {
// $event->setAdminStyle(new \App\Model\Product\AdminStyle\Folder($element));
// }
}
}