mirror of
https://github.com/anthonyaxenov/iptv.git
synced 2024-11-24 22:34:34 +00:00
Фикс несуществуеющего custom.twig
This commit is contained in:
parent
17ecc60497
commit
1edf1d8455
@ -13,6 +13,7 @@ class TwigFunctions extends AbstractExtension
|
||||
{
|
||||
return [
|
||||
new TwigFunction('config', [$this, 'config']),
|
||||
new TwigFunction('is_file', [$this, 'is_file']),
|
||||
new TwigFunction('base_url', [$this, 'base_url']),
|
||||
];
|
||||
}
|
||||
@ -26,4 +27,9 @@ class TwigFunctions extends AbstractExtension
|
||||
{
|
||||
return base_url($path);
|
||||
}
|
||||
|
||||
public function is_file(string $path): bool
|
||||
{
|
||||
return is_file($path);
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,8 @@
|
||||
href="https://axenov.dev">axenov.dev</a>
|
||||
</footer>
|
||||
</div>
|
||||
{% include "custom/custom.twig" %}
|
||||
{% if is_file("custom/custom.twig") %}
|
||||
{% include "custom/custom.twig" %}
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user