pattern-lab/patternlab-php — pull request #65 by coding-stuff (2013-11-27 13:28:08+00:00)
Title: Allowed for use of Param with Pattern Includes

Created two new methods:

::getPatternIncludeData line 185

Which extracts param from pattern include call

and

::renderPattern line 278

which replaces param name with actual param value.

I also modified the ::loadFile method so that it makes use of both functions before returning patterns.

Now you can pass variables to patterns when they are included like this:

{{> patternType-patternName(param: param_value, param2: value 2 ...) }}

For parse to work properly, however, commas and parentheses must be escaped with a back slash (example: This is a \\(string\\) \, separated with a comma )

I've tested/debugged this multiple times, and it works, check it out