From d2e029c50443f28b16754688bd42570cb21fccca Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 30 Jan 2024 11:07:39 +0200 Subject: [PATCH] replace "; }, $str); + // replace #s', static function (array $matches) + { + $tag = 'et2-tree'.($matches[1] ?? ''); + $attrs = parseAttrs($matches[2]); + if (!empty($attrs['multiple']) && $attrs['multiple'] !== 'false') + { + $tag .= '-multiple'; + } + // fix renamed attrs, thought regular under_score to camelCase happens later + if (!empty($attrs['parent_node'])) $attrs['parentId'] = $attrs['parent_node']; + unset($attrs['multiple'], $attrs['options'], $attrs['parent_node']); + return "<$tag" . stringAttrs($attrs) . ">"; + }, $str); + if ($template === 'mobile') { } @@ -589,4 +604,4 @@ function stringAttrs(array $attrs) return ' '.implode(' ', array_map(static function ($name, $value) { return $name . '="' . $value . '"'; }, array_keys($attrs), $attrs)); -} \ No newline at end of file +}