1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-08 23:26:34 +02:00

Version 1.3.0: Meta-Information

This commit is contained in:
trendschau
2019-12-31 15:57:45 +01:00
parent ead51d6540
commit 7d41c4894c
85 changed files with 964 additions and 1364 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace Typemill\Extensions;
use Typemill\Models\WriteYaml;
class TwigMetaExtension extends \Twig_Extension
{
public function getFunctions()
{
return [
new \Twig_SimpleFunction('getPageMeta', array($this, 'getMeta' ))
];
}
public function getMeta($settings, $item)
{
$write = new WriteYaml();
$meta = $write->getPageMeta($settings, $item);
return $meta;
}
}