1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-12 16:14:16 +02:00

Flextype Slim Integration - next round of integration

This commit is contained in:
Awilum
2019-03-04 12:11:21 +03:00
parent 88b88b6cd9
commit 671e0e6797
6 changed files with 1 additions and 59 deletions

View File

@@ -15,7 +15,6 @@ namespace Flextype;
use Thunder\Shortcode\ShortcodeFacade;
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
// Snippets
// Shortcode: [snippets fetch=snippet-name]
$flextype['shortcodes']->addHandler('snippets', function(ShortcodeInterface $s) use ($flextype) {
return $flextype['shortcodes']->fetch($s->getParameter('fetch'));

View File

@@ -1,24 +0,0 @@
<?php
/**
* Slim Framework (http://slimframework.com)
*
* @link https://github.com/slimphp/Twig-View
* @copyright Copyright (c) 2011-2015 Josh Lockhart
* @license https://github.com/slimphp/Twig-View/blob/master/LICENSE.md (MIT License)
*/
namespace Flextype;
class ATwigExtension extends \Twig_Extension
{
public function getFunctions()
{
return [
new \Twig_SimpleFunction('a', array($this, 'a')),
];
}
public function a()
{
return 'aaa';
}
}

View File

@@ -1,22 +0,0 @@
<?php
namespace Flextype;
use Slim\Http\Request;
use Slim\Http\Response;
use Flextype\Component\Arr\Arr;
use Flextype\Component\Event\Event;
use Flextype\Component\Registry\Registry;
include 'ATwigExtension.php';
// Define app routes
//Flextype::router()->get('/test', function (Request $request, Response $response, array $args) {
// return 'test';
//});
//Flextype::container()['view']->addExtension(new ATwigExtension());
//Flextype::flextype()->version();

View File

@@ -1,10 +0,0 @@
name: Site
version: 0.0.0
description: "Site plugin for Flextype"
author:
name: Sergey Romanenko
email: awilum@yandex.ru
url: http://flextype.org
homepage: https://github.com/flextype-plugins/admin
bugs: https://github.com/flextype-plugins/admin/issues
license: MIT

View File

@@ -1 +0,0 @@
enabled: true

View File

@@ -1,5 +1,5 @@
name: Site
version: 0.0.0
version: 1.0.0
description: "Site plugin for Flextype"
author:
name: Sergey Romanenko