From 16c41f683fe6b27b961db4db1a432d45f02d9f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 5 Nov 2021 13:19:23 +0100 Subject: [PATCH] DEBUG, both should work --- src/Card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Card.php b/src/Card.php index 6b3797181b..3d704d8c47 100644 --- a/src/Card.php +++ b/src/Card.php @@ -280,11 +280,11 @@ public function addAction(Model\UserAction $action, $executorClass, $button = nu $vp = VirtualPage::addTo($this)->set(function (View $page) use ($executorClass, $action) { $id = $this->stickyGet($this->name); - $executor = $page->add(new $executorClass()); + $executor = View::addToWithCl($page, [$executorClass]); $action->setEntity($action->getModel()->load($id)); - $executor->setAction($action); + $executor->setAction($action); // @phpstan-ignore-line }); $btn->on('click', new JsModal($action->caption, $vp, [$this->name => (new Jquery())->parents('.atk-card')->data('id')]));