From afbd54ae871254eea2adcda75885f58b6bcf0718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20As=C3=ADs?= <50383201+easis@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:44:22 +0100 Subject: [PATCH] Use of option var instead of fixed key --- docs/src/docs/components/actions.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/src/docs/components/actions.md b/docs/src/docs/components/actions.md index 8c178d91..4cc1704f 100644 --- a/docs/src/docs/components/actions.md +++ b/docs/src/docs/components/actions.md @@ -285,13 +285,11 @@ class ModalActionType extends ButtonActionType { public function buildView(ActionView $view, ActionInterface $action, array $options): void { - $templatePath = $options['template_path']; - if ($view->parent instanceof ColumnValueView) { // [!code ++] $value = $view->parent->vars['value']; // [!code ++] foreach (['template_path', 'template_vars'] as $optionName) { // [!code ++] - if (is_callable($templatePath)) { // [!code ++] + if (is_callable($options[$optionName])) { // [!code ++] $options[$optionName] = $options[$optionName]($value); // [!code ++] } // [!code ++] } // [!code ++]