Skip to content

Commit d0d235b

Browse files
author
Doğa Gürdal
committed
feat(snippets/php): add dynamic subcomponent snippet
1 parent 87612ca commit d0d235b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

snippets/php.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,15 @@
4444
"\treturn \\$data;",
4545
"});"
4646
]
47+
},
48+
"Dynamic Subcomponent": {
49+
"prefix": "flyntDynamicSubcomponent",
50+
"body": [
51+
"add_filter('Flynt/dynamicSubcomponents?name=${1:${TM_DIRECTORY/.*\\/(.+)$/${1:/capitalize}/}}', function (\\$areas, \\$data, \\$parentData) {",
52+
"\t$2",
53+
"",
54+
"\treturn \\$areas;",
55+
"}, 10, 3);"
56+
]
4757
}
4858
}

0 commit comments

Comments
 (0)