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; }
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()); }
public function makePath(SourcePattern $pattern) { $path = Navigation::escapePath($pattern->getPath()); return PatternLab::makePath([$path, "{$path}.html"]); }