return $this->
getSnippetsFromDir($directory);
} /**
* @return array<int, string>
*/
private function getPluginSnippets(): array
{ $snippets =
[];
foreach ($this->plugins->
getActives() as $plugin) { $snippetDir =
$plugin->
getPath() . '/Resources/views/snippets/';
if (!
is_dir($snippetDir)) { continue;
} $snippets =
[...
$snippets, ...
$this->
getSnippetsFromDir($snippetDir)];
} return $snippets;
}