Ejemplo n.º 1
0
 public function getContents(StyleguideInterface $styleguide)
 {
     $contents = "var config = " . json_encode($this->getConfig($styleguide)) . ";";
     $contents .= "var ishControls = " . json_encode($this->getControls()) . ";";
     $contents .= "var navItems = " . json_encode($this->navigation) . ";";
     $contents .= "var patternPaths = " . json_encode($this->navigation->getPatternPaths()) . ";";
     $contents .= "var viewAllPaths = " . json_encode($this->navigation->getIndexPaths()) . ";";
     $contents .= "var plugins = " . json_encode($this->getPlugins()) . ";";
     return $contents;
 }
Ejemplo n.º 2
0
 public function __construct(SourceInterface $subtype)
 {
     list($this->type, $this->subtype) = explode(DIRECTORY_SEPARATOR, $subtype->getPath());
     $this->partial = Navigation::escapePath($subtype->getNormalizedPath());
     $this->path = Navigation::escapePath($subtype->getPath());
 }
Ejemplo n.º 3
0
 public function makePath(SourcePattern $pattern)
 {
     $path = Navigation::escapePath($pattern->getPath());
     return PatternLab::makePath([$path, "{$path}.html"]);
 }