Edit on GitHub
Jump to docs navigation

Twig Components / Methods / format_file

format_file(line, text = null) is a Twig filter to generate the file path inside an <a> element. If the path is inside the kernel root directory, the kernel root directory path is replaced by kernel.project_dir (showing the full path in a tooltip on hover).

type: string

type: integer

text (optional)

type: string default: null

Source: Twig

Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.