-
-
Notifications
You must be signed in to change notification settings - Fork 358
[LiveComponent] add LiveProp name to modifier function #2652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
09b1d86
208952b
2197b93
79113fe
67eb6b5
cb989bb
1fc98e5
adf15e7
cb6054e
a25cca5
bda797f
9af4c3e
f42d00f
b68a52f
898953e
62978fa
54da4dd
67f9389
44dbe5c
13dfc84
8233dae
2392dbf
db81f8a
03ee49c
299ba41
0c32931
7990353
fa8be73
f2d56ac
ec4acbe
42940f8
7525823
284144d
a5f8a57
0b9bc26
c5e763d
d648b2c
134e1eb
2368fef
98dec2a
a0f5379
c9e0f4f
726305e
c987f60
d2086da
ae4d71d
26c44dc
8cb5384
ae50fa4
d080144
c4dcce6
087f09c
1282995
05726a6
7591e98
fc9d51e
c88678c
ad75701
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
; top-most EditorConfig file | ||
root = true | ||
|
||
; Unix-style newlines | ||
[*] | ||
charset = utf-8 | ||
end_of_line = LF | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{php,html,twig}] | ||
indent_style = space | ||
indent_size = 4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
* text=auto eol=lf | ||
/.yarn/** linguist-vendored | ||
/.yarn/releases/* binary | ||
/.yarn/plugins/**/* binary | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Toolkit Kits | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'src/Toolkit/kits/**' | ||
pull_request: | ||
paths: | ||
- 'src/Toolkit/kits/**' | ||
|
||
jobs: | ||
kits-cs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
|
||
- name: Install composer packages | ||
uses: ramsey/composer-install@v3 | ||
with: | ||
working-directory: src/Toolkit | ||
|
||
- name: Check kits code style | ||
run: php vendor/bin/twig-cs-fixer check kits | ||
working-directory: src/Toolkit |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ composer require symfony/ux-autocomplete:2.23.0 | |
npm add @symfony/[email protected] | ||
``` | ||
|
||
**Tip:** Your `package.json` file will be automatically modified by [Flex](https://github.com/symfony/flex) when installing or upgrading a PHP package. To prevent this behavior, ensure to **use at least Flex 1.22.0 or 2.5.0**, and run `composer config extra.symfony.flex.synchronize_package_json false`. | ||
|
||
## Resources | ||
|
||
- [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ composer require symfony/ux-chartjs:2.23.0 | |
npm add @symfony/[email protected] | ||
``` | ||
|
||
**Tip:** Your `package.json` file will be automatically modified by [Flex](https://github.com/symfony/flex) when installing or upgrading a PHP package. To prevent this behavior, ensure to **use at least Flex 1.22.0 or 2.5.0**, and run `composer config extra.symfony.flex.synchronize_package_json false`. | ||
|
||
## Resources | ||
|
||
- [Documentation](https://symfony.com/bundles/ux-chartjs/current/index.html) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ composer require symfony/ux-cropperjs:2.23.0 | |
npm add @symfony/[email protected] | ||
``` | ||
|
||
**Tip:** Your `package.json` file will be automatically modified by [Flex](https://github.com/symfony/flex) when installing or upgrading a PHP package. To prevent this behavior, ensure to **use at least Flex 1.22.0 or 2.5.0**, and run `composer config extra.symfony.flex.synchronize_package_json false`. | ||
|
||
## Resources | ||
|
||
- [Documentation](https://symfony.com/bundles/ux-cropperjs/current/index.html) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ composer require symfony/ux-dropzone:2.23.0 | |
npm add @symfony/[email protected] | ||
``` | ||
|
||
**Tip:** Your `package.json` file will be automatically modified by [Flex](https://github.com/symfony/flex) when installing or upgrading a PHP package. To prevent this behavior, ensure to **use at least Flex 1.22.0 or 2.5.0**, and run `composer config extra.symfony.flex.synchronize_package_json false`. | ||
|
||
## Resources | ||
|
||
- [Documentation](https://symfony.com/bundles/ux-dropzone/current/index.html) | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\UX\Icons\Exception; | ||
|
||
/** | ||
* @author Kevin Bond <kevinbond@gmail.com> | ||
* | ||
* @internal | ||
*/ | ||
final class HttpClientNotInstalledException extends \LogicException | ||
{ | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2651,6 +2651,47 @@ This way you can also use the component multiple times in the same page and avoi | |
<twig:SearchModule alias="q1" /> | ||
<twig:SearchModule alias="q2" /> | ||
|
||
.. versionadded:: 2.25 | ||
|
||
The property name is passed into the modifier function since LiveComponents 2.25. | ||
|
||
The ``modifier`` function can also take the name of the property as a secondary parameter. | ||
It can be used to perform more generic operations inside of the modifier that can be re-used for multiple props:: | ||
|
||
abstract class AbstractSearchModule | ||
{ | ||
#[LiveProp(writable: true, url: true, modifier: 'modifyQueryProp')] | ||
public string $query = ''; | ||
|
||
protected string $urlPrefix = ''; | ||
|
||
public function modifyQueryProp(LiveProp $liveProp, string $propName): LiveProp | ||
{ | ||
if ($this->urlPrefix) { | ||
return $liveProp->withUrl(new UrlMapping(as: $this->urlPrefix.'-'.$propName)); | ||
} | ||
return $liveProp; | ||
} | ||
} | ||
|
||
#[AsLiveComponent] | ||
class ImportantSearchModule extends AbstractSearchModule | ||
{ | ||
} | ||
|
||
#[AsLiveComponent] | ||
class SecondarySearchModule extends AbstractSearchModule | ||
{ | ||
protected string $urlPrefix = 'secondary'; | ||
} | ||
Comment on lines
+2661
to
+2686
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering.. could we find use an example more focused on the feature than the PHP code structure abstract/extends here ? I was thinking something like "imagine you have a CMS theme editor with a split view allowing you to adjust your design both in light and dark mode. ... You could use a ColorTheme LiveComponent for both, but then [describe problem]
Thanks to the second parameter of YYY, you can dynamically prefix [...].
Now your query parameters will be: XXX ZZZ It even works with the as: property .. // query param will be ZZZ
#[LiveProp(url: true, as: 'bg' modifier: 'prefixParam')]
public string $background; wdyt ? |
||
|
||
.. code-block:: html+twig | ||
|
||
<twig:ImportantSearchModule /> | ||
<twig:SecondarySearchModule /> | ||
|
||
The ``query`` value will appear in the URL like ``/search?query=my+important+query&secondary-query=my+secondary+query``. | ||
|
||
Validating the Query Parameter Values | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,7 +135,7 @@ public function withModifier(object $component): self | |
throw new \LogicException(\sprintf('Method "%s::%s()" given in LiveProp "modifier" does not exist.', $component::class, $modifier)); | ||
} | ||
|
||
$modifiedLiveProp = $component->{$modifier}($this->liveProp); | ||
$modifiedLiveProp = $component->{$modifier}($this->liveProp, $this->getName()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For a change like this, a test would be needed. Especially for things related to query, URL, etc. (The fact tests do pass after your changes does not proves it does work (nor that our current suite of test is good enough, to be fair)) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added to the existing test, I don't see the need to make a separate test for just this param unless there are some edge cases that aren't entirely obvious to me at this time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's test a page with two instances of same component, different prefix used in the modifier ... and check that the correct one as the good value and not the other :) |
||
if (!$modifiedLiveProp instanceof LiveProp) { | ||
throw new \LogicException(\sprintf('Method "%s::%s()" should return an instance of "%s" (given: "%s").', $component::class, $modifier, LiveProp::class, get_debug_type($modifiedLiveProp))); | ||
} | ||
|
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"my_api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[{"position":{"lat":48.8566,"lng":2.3522},"title":"Paris","infoWindow":null,"icon":{"type":"url","width":32,"height":32,"url":"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap-icons@1.11.3\/icons\/geo-alt.svg"},"extra":[],"id":null,"@id":"217fa57668ad8e64"},{"position":{"lat":45.764,"lng":4.8357},"title":"Lyon","infoWindow":null,"icon":{"type":"ux-icon","width":32,"height":32,"name":"fa:map-marker","_generated_html":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\">...<\/svg>"},"extra":[],"id":null,"@id":"255b208136900fc0"},{"position":{"lat":45.8566,"lng":2.3522},"title":"Dijon","infoWindow":null,"icon":{"type":"svg","width":24,"height":24,"html":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\">...<\/svg>"},"extra":[],"id":null,"@id":"1a410e92214f770c"}]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="my-custom-controller symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
class="map" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"my_api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":"CustomMapId","gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"my_api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":"DefaultMapId","gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"my_api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":"DefaultMapId","gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"id":"gmap","language":"fr","region":"FR","nonce":"abcd","retries":10,"url":"https:\/\/maps.googleapis.com\/maps\/api\/js","version":"quarterly","apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[{"position":{"lat":48.8566,"lng":2.3522},"title":"Paris","infoWindow":null,"icon":null,"extra":[],"id":"marker1","@id":"872feba9ebf3905d"},{"position":{"lat":48.8566,"lng":2.3522},"title":"Lyon","infoWindow":{"headerContent":null,"content":"Lyon","position":null,"opened":false,"autoClose":true,"extra":[]},"icon":null,"extra":[],"id":"marker2","@id":"6028bf5e41f644ab"}]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[{"position":{"lat":48.8566,"lng":2.3522},"title":"Paris","infoWindow":null,"icon":null,"extra":[],"id":"marker1","@id":"872feba9ebf3905d"},{"position":{"lat":48.8566,"lng":2.3522},"title":"Lyon","infoWindow":{"headerContent":null,"content":"Lyon","position":null,"opened":false,"autoClose":true,"extra":[]},"icon":null,"extra":[],"id":null,"@id":"bce206d73dc5c164"}]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[{"points":[{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522}],"title":null,"infoWindow":null,"extra":[],"id":null,"@id":"7cdd432ea54d0ce9"},{"points":[{"lat":1.1,"lng":2.2},{"lat":3.3,"lng":4.4},{"lat":5.5,"lng":6.6}],"title":null,"infoWindow":{"headerContent":null,"content":"Polygon","position":null,"opened":false,"autoClose":true,"extra":[]},"extra":[],"id":null,"@id":"9074e0a9ead08c1e"}]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20},"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[{"points":[{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522}],"title":null,"infoWindow":null,"extra":[],"id":null,"@id":"7cdd432ea54d0ce9"},{"points":[{"lat":1.1,"lng":2.2},{"lat":3.3,"lng":4.4},{"lat":5.5,"lng":6.6}],"title":null,"infoWindow":{"headerContent":null,"content":"Polygon","position":null,"opened":false,"autoClose":true,"extra":[]},"extra":[],"id":null,"@id":"9074e0a9ead08c1e"}]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-google-map--map" | ||
data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"api_key"}" | ||
data-symfony--ux-google-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-google-map--map-zoom-value="12" | ||
data-symfony--ux-google-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-google-map--map-options-value="{"mapId":null,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"@provider":"google"}" | ||
data-symfony--ux-google-map--map-markers-value="[]" | ||
data-symfony--ux-google-map--map-polygons-value="[]" | ||
data-symfony--ux-google-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-leaflet-map--map" | ||
data-symfony--ux-leaflet-map--map-provider-options-value="{}" | ||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-leaflet-map--map-zoom-value="12" | ||
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}" | ||
data-symfony--ux-leaflet-map--map-markers-value="[{"position":{"lat":48.8566,"lng":2.3522},"title":"Paris","infoWindow":null,"icon":{"type":"url","width":32,"height":32,"url":"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap-icons@1.11.3\/icons\/geo-alt.svg"},"extra":[],"id":null,"@id":"217fa57668ad8e64"},{"position":{"lat":45.764,"lng":4.8357},"title":"Lyon","infoWindow":null,"icon":{"type":"ux-icon","width":32,"height":32,"name":"fa:map-marker","_generated_html":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\">...<\/svg>"},"extra":[],"id":null,"@id":"255b208136900fc0"},{"position":{"lat":45.8566,"lng":2.3522},"title":"Dijon","infoWindow":null,"icon":{"type":"svg","width":24,"height":24,"html":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\">...<\/svg>"},"extra":[],"id":null,"@id":"1a410e92214f770c"}]" | ||
data-symfony--ux-leaflet-map--map-polygons-value="[]" | ||
data-symfony--ux-leaflet-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-leaflet-map--map" | ||
data-symfony--ux-leaflet-map--map-provider-options-value="{}" | ||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-leaflet-map--map-zoom-value="12" | ||
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}" | ||
data-symfony--ux-leaflet-map--map-markers-value="[]" | ||
data-symfony--ux-leaflet-map--map-polygons-value="[]" | ||
data-symfony--ux-leaflet-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-leaflet-map--map" | ||
data-symfony--ux-leaflet-map--map-provider-options-value="{}" | ||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-leaflet-map--map-zoom-value="12" | ||
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}" | ||
data-symfony--ux-leaflet-map--map-markers-value="[]" | ||
data-symfony--ux-leaflet-map--map-polygons-value="[]" | ||
data-symfony--ux-leaflet-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="my-custom-controller symfony--ux-leaflet-map--map" | ||
data-symfony--ux-leaflet-map--map-provider-options-value="{}" | ||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-leaflet-map--map-zoom-value="12" | ||
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}" | ||
data-symfony--ux-leaflet-map--map-markers-value="[]" | ||
data-symfony--ux-leaflet-map--map-polygons-value="[]" | ||
data-symfony--ux-leaflet-map--map-polylines-value="[]" | ||
class="map" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-leaflet-map--map" | ||
data-symfony--ux-leaflet-map--map-provider-options-value="{}" | ||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-leaflet-map--map-zoom-value="12" | ||
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}" | ||
data-symfony--ux-leaflet-map--map-markers-value="[{"position":{"lat":48.8566,"lng":2.3522},"title":"Paris","infoWindow":null,"icon":null,"extra":[],"id":"marker1","@id":"872feba9ebf3905d"},{"position":{"lat":48.8566,"lng":2.3522},"title":"Lyon","infoWindow":{"headerContent":null,"content":"Lyon","position":null,"opened":false,"autoClose":true,"extra":[]},"icon":null,"extra":[],"id":"marker2","@id":"6028bf5e41f644ab"}]" | ||
data-symfony--ux-leaflet-map--map-polygons-value="[]" | ||
data-symfony--ux-leaflet-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-leaflet-map--map" | ||
data-symfony--ux-leaflet-map--map-provider-options-value="{}" | ||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-leaflet-map--map-zoom-value="12" | ||
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}" | ||
data-symfony--ux-leaflet-map--map-markers-value="[{"position":{"lat":48.8566,"lng":2.3522},"title":"Paris","infoWindow":null,"icon":null,"extra":[],"id":"marker1","@id":"872feba9ebf3905d"},{"position":{"lat":48.8566,"lng":2.3522},"title":"Lyon","infoWindow":{"headerContent":null,"content":"Lyon","position":null,"opened":false,"autoClose":true,"extra":[]},"icon":null,"extra":[],"id":null,"@id":"bce206d73dc5c164"}]" | ||
data-symfony--ux-leaflet-map--map-polygons-value="[]" | ||
data-symfony--ux-leaflet-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-leaflet-map--map" | ||
data-symfony--ux-leaflet-map--map-provider-options-value="{}" | ||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-leaflet-map--map-zoom-value="12" | ||
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}" | ||
data-symfony--ux-leaflet-map--map-markers-value="[]" | ||
data-symfony--ux-leaflet-map--map-polygons-value="[{"points":[{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522}],"title":null,"infoWindow":null,"extra":[],"id":"polygon1","@id":"35bfa920335b849d"},{"points":[{"lat":1.1,"lng":2.2},{"lat":3.3,"lng":4.4},{"lat":5.5,"lng":6.6}],"title":null,"infoWindow":{"headerContent":null,"content":"Polygon","position":null,"opened":false,"autoClose":true,"extra":[]},"extra":[],"id":"polygon2","@id":"7be1fe9f10489d73"}]" | ||
data-symfony--ux-leaflet-map--map-polylines-value="[]" | ||
></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- This HTML has been prettified for testing purposes, and may not represent the actual HTML output. | ||
Run "php vendor/bin/phpunit -d --update-snapshots" to update the snapshot. --> | ||
<div | ||
data-controller="symfony--ux-leaflet-map--map" | ||
data-symfony--ux-leaflet-map--map-provider-options-value="{}" | ||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":2.3522}" | ||
data-symfony--ux-leaflet-map--map-zoom-value="12" | ||
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false" | ||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}" | ||
data-symfony--ux-leaflet-map--map-markers-value="[]" | ||
data-symfony--ux-leaflet-map--map-polygons-value="[]" | ||
data-symfony--ux-leaflet-map--map-polylines-value="[{"points":[{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522}],"title":null,"infoWindow":null,"extra":[],"id":"polyline1","@id":"823f6ee5acdb5db3"},{"points":[{"lat":1.1,"lng":2.2},{"lat":3.3,"lng":4.4},{"lat":5.5,"lng":6.6}],"title":null,"infoWindow":{"headerContent":null,"content":"Polyline","position":null,"opened":false,"autoClose":true,"extra":[]},"extra":[],"id":"polyline2","@id":"77fb0e390b5e91f1"}]" | ||
></div> |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'd have to be updated to the actual release version, I just took the next one.