feat(twig/templates): register
This commit is contained in:
parent
245487ad7f
commit
527f59f07e
@ -35,4 +35,20 @@ class SeacmsAuth extends AbstractPicoPlugin implements ApiAware
|
|||||||
{
|
{
|
||||||
return new JsonResponse(200,['connected'=>false]);
|
return new JsonResponse(200,['connected'=>false]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Triggered when Pico registers the twig template engine
|
||||||
|
*
|
||||||
|
* @see Pico::getTwig()
|
||||||
|
*
|
||||||
|
* @param Twig_Environment &$twig Twig instance
|
||||||
|
*/
|
||||||
|
public function onTwigRegistered(Twig_Environment &$twig)
|
||||||
|
{
|
||||||
|
$twigLoader = $twig->getLoader();
|
||||||
|
$templateDir = $this->getPluginsDir().'SeacmsAuth/templates';
|
||||||
|
if (is_dir($templateDir)){
|
||||||
|
$twigLoader->addPath($templateDir, 'SeacmsAuth');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
5
templates/head-scripts.twig
Normal file
5
templates/head-scripts.twig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{# SPDX-License-Identifier: EUPL-1.2 #}
|
||||||
|
{# Authors: see README.md #}
|
||||||
|
<!-- SeacmsAuth Header TODO -->
|
||||||
|
|
||||||
|
|
3
templates/head-styles.twig
Normal file
3
templates/head-styles.twig
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{# SPDX-License-Identifier: EUPL-1.2 #}
|
||||||
|
{# Authors: see README.md #}
|
||||||
|
<!-- SeacmsAuth Header Styles TODO -->
|
Loading…
x
Reference in New Issue
Block a user