From 0f6febd1c96dbd38a9f49a85b5162dfbddbdd956 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 00b0544856..50ccbbe1ad 100644 --- a/src/Card.php +++ b/src/Card.php @@ -267,11 +267,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 = $action->getActionForEntity($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')]));