TemplatePathCandidateResolver
in package
implements
TemplatePathCandidateResolverInterface
Twig テンプレートの探索候補を返す。
拡張子が html・なし・twig(html コンテキスト)の場合: {base}.twig → {base}.html.twig → {base}.html 拡張子なしや .twig 指定は .html と同等に扱う。
それ以外の拡張子(例: .xml)の場合: {base}.{ext}.twig → {base}.{ext} 汎用の {base}.twig は含めない。xml 等を html テンプレートとして 誤って解決しないよう、元の拡張子に紐づく候補のみに絞る。
Table of Contents
Interfaces
Methods
- getCandidates() : array<int, string>
- findTemplate / Twig Loader 用のテンプレートパス候補(探索順)
Methods
getCandidates()
findTemplate / Twig Loader 用のテンプレートパス候補(探索順)
public
getCandidates(string $path) : array<int, string>
Parameters
- $path : string