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 ++]