private const ALLOWED_FILE_EXTENSIONS = '*.twig';
public function __construct(private readonly AbstractAppLoader
$appLoader) { } /**
* {@inheritdoc}
*/
public function getTemplatePathsForApp(Manifest
$app): array
{ $viewDirectory =
$this->appLoader->
locatePath($app->
getPath(), self::TEMPLATE_DIR
);
if ($viewDirectory === null
) { return [];
} $finder =
new Finder();
$finder->
files() ->
in($viewDirectory) ->
name(self::ALLOWED_FILE_EXTENSIONS
) ->
path(self::ALLOWED_TEMPLATE_DIRS
) ->
ignoreUnreadableDirs();