@@ -258,7 +258,7 @@ protected function generatePatterns() {
258
258
if ($ pathInfo ["render " ]) {
259
259
260
260
// get the rendered, escaped, and mustache pattern
261
- $ this ->generatePatternFile ($ pathInfo ["patternSrcPath " ].".mustache " ,$ pathInfo ["patternPartial " ],$ pathInfo ["patternDestPath " ]);
261
+ $ this ->generatePatternFile ($ pathInfo ["patternSrcPath " ].".mustache " ,$ pathInfo ["patternPartial " ],$ pathInfo ["patternDestPath " ], $ pathInfo [ " patternState " ] );
262
262
263
263
}
264
264
@@ -273,16 +273,18 @@ protected function generatePatterns() {
273
273
* @param {String} the filename of the file to be rendered
274
274
* @param {String} the pattern partial
275
275
* @param {String} path where the files need to be written too
276
+ * @param {String} pattern state
276
277
*/
277
- private function generatePatternFile ($ f ,$ p ,$ path ) {
278
+ private function generatePatternFile ($ f ,$ p ,$ path, $ state ) {
278
279
279
280
// render the pattern and return it as well as the encoded version
280
281
list ($ rf ,$ e ) = $ this ->renderPattern ($ f ,$ p );
281
282
282
283
// the core footer isn't rendered as mustache but we have some variables there any way. find & replace.
283
284
$ rf = str_replace ("{% patternPartial %} " ,$ p ,$ rf );
284
285
$ rf = str_replace ("{% lineage %} " ,json_encode ($ this ->patternLineages [$ p ]),$ rf );
285
- $ rf = str_replace ("{% lineager %} " ,json_encode ($ this ->patternLineagesR [$ p ]),$ rf );
286
+ $ rf = str_replace ("{% lineageR %} " ,json_encode ($ this ->patternLineagesR [$ p ]),$ rf );
287
+ $ rf = str_replace ("{% patternState %} " ,$ state ,$ rf );
286
288
287
289
// figure out what to put in the css section
288
290
$ c = $ this ->enableCSS && isset ($ this ->patternCSS [$ p ]) ? "true " : "false " ;
0 commit comments