You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Pattern Lab core only supports global data files and a pattern-specific data fil
21
21
22
22
### Data transform functions
23
23
24
-
Currently the plugin provides 3 transform functions for the data read by Pattern Lab. The examples provided are in JSON but Pattern Lab supports YAML too!
24
+
Currently the plugin provides four transform functions for the data read by Pattern Lab. The examples provided are in JSON but Pattern Lab supports YAML too!
25
25
26
26
27
27
#### Include pattern files
@@ -87,7 +87,29 @@ The value of `key` will be replaced with the joined strings. Note that in the ex
87
87
}
88
88
```
89
89
90
-
The value of `key` will be replaced with an [Attribute object](https://www.drupal.org/node/2513632).
90
+
The value of `key` will be replaced with an [`Attribute` object](https://www.drupal.org/node/2513632).
91
+
92
+
93
+
#### Create Drupal `Url` objects
94
+
95
+
```json
96
+
{
97
+
"key": {
98
+
"Url()": {
99
+
"url": "http://example.com",
100
+
"options": {
101
+
"attributes": {
102
+
"Attribute()": {
103
+
"class": ["link"]
104
+
}
105
+
}
106
+
}
107
+
}
108
+
}
109
+
}
110
+
```
111
+
112
+
The value of `key` will be replaced with an `Url` object. Note that in the example `attributes` will be replaced with an `Attribute` object before the `Url` object is created.
0 commit comments