Skip to content

Commit 0fdefc5

Browse files
committed
Fixing old stimulus_controller() syntax for multiple controllers
1 parent 46d885d commit 0fdefc5

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

src/LazyImage/doc/index.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,8 @@ Then in your template, add your controller to the HTML attribute:
145145

146146
<img
147147
src="{{ data_uri_thumbnail('public/image/large.png', 100, 75) }}"
148-
{{ stimulus_controller({
149-
mylazyimage: {},
150-
'symfony/ux-lazy-image/lazy-image': {
151-
src: asset('image/large.png')
152-
}
148+
{{ stimulus_controller('mylazyimage')|stimulus_controller('symfony/ux-lazy-image/lazy-image', {
149+
src: asset('image/large.png')
153150
}) }}
154151

155152
{# Using BlurHash, the size is required #}

src/Swup/doc/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,8 @@ Then in your template, add your controller to the HTML attribute:
178178
<title>Swup</title>
179179
{# ... #}
180180
</head>
181-
<body {{ stimulus_controller({
182-
myswup: {},
183-
'symfony/ux-swup/swup': {}
181+
<body {{ stimulus_controller('myswup')|stimulus_controller('symfony/ux-swup/swup', {
182+
// ... options
184183
}) }}>
185184
{# ... #}
186185
</body>

src/Typed/doc/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ Then in your template, add your controller to the HTML attribute:
132132
<title>Typed</title>
133133
{# ... #}
134134
</head>
135-
<body {{ stimulus_controller({
136-
mytyped: {},
137-
'symfony/ux-typed': {}
135+
<body {{ stimulus_controller('mytyped')|stimulus_controller('symfony/ux-typed', {
136+
strings: ['...'],
138137
}) }}>
139138
{# ... #}
140139
</body>

0 commit comments

Comments
 (0)