@@ -31,13 +31,19 @@ public function __construct($options) {
31
31
32
32
public function run ($ depth , $ ext , $ path , $ pathName , $ name ) {
33
33
34
+ // load default vars
35
+ $ dirSep = PatternData::$ dirSep ;
36
+
34
37
// set-up the names
35
- $ patternType = $ name ; // 00-atoms
36
- $ patternTypeDash = $ this ->getPatternName ($ name ,false ); // atoms
37
- $ patternTypeClean = str_replace ("- " ," " ,$ patternTypeDash ); // atoms (dashes replaced with spaces)
38
+ $ patternType = $ name ; // 00-atoms
39
+ $ patternTypeDash = $ this ->getPatternName ($ name ,false ); // atoms
40
+ $ patternTypeClean = str_replace ("- " ," " ,$ patternTypeDash ); // atoms (dashes replaced with spaces)
41
+
42
+ $ patternTypePath = $ pathName ; // 00-atoms/02-blocks
43
+ $ patternTypePathDash = str_replace ($ dirSep ,"- " ,$ patternTypePath ); // 00-atoms-02-blocks (file path)
38
44
39
45
// create a key for the data store
40
- $ patternStoreKey = $ patternTypeDash ."-pltype " ;
46
+ $ patternStoreKey = $ patternTypeDash ."-pltype " ;
41
47
42
48
// add a new patternType to the nav
43
49
PatternData::$ store [$ patternStoreKey ] = array ("category " => "patternType " ,
@@ -47,8 +53,9 @@ public function run($depth, $ext, $path, $pathName, $name) {
47
53
"depth " => $ depth ,
48
54
"ext " => $ ext ,
49
55
"path " => $ path ,
50
- "pathName " => $ pathName ,
51
- "isDir " => $ this ->isDirProp ,
56
+ "pathName " => $ patternTypePath ,
57
+ "pathDash " => $ patternTypePathDash ,
58
+ "isDir " => $ this ->isDirProp ,
52
59
"isFile " => $ this ->isFileProp );
53
60
54
61
// starting a new set of pattern types. it might not have any pattern subtypes
0 commit comments