private function generateForElement(ElementReflectionInterface $element) { $template = $this->templateFactory->createNamedForElement('source', $element); $template = $this->namespaceAndPackageLoader->loadTemplateWithElementNamespaceOrPackage($template, $element); $template->setParameters(['fileName' => $this->relativePathResolver->getRelativePath($element->getFileName()), 'source' => $this->getHighlightedCodeFromElement($element)]); $template->save(); }
/** * @param string $fileName * @return string */ public function relativePath($fileName) { return $this->relativePathResolver->getRelativePath($fileName); }
private function generateForElement(ReflectionElement $element) { $template = $this->templateFactory->createNamedForElement(TCO::SOURCE, $element); $template->setParameters(['fileName' => $this->relativePathResolver->getRelativePath($element->getFileName()), 'source' => $this->getHighlightedCodeFromElement($element)]); $template->save(); }