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:
@@ -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'));
|
||||
|
@@ -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';
|
||||
}
|
||||
}
|
@@ -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();
|
@@ -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
|
@@ -1 +0,0 @@
|
||||
enabled: true
|
@@ -1,5 +1,5 @@
|
||||
name: Site
|
||||
version: 0.0.0
|
||||
version: 1.0.0
|
||||
description: "Site plugin for Flextype"
|
||||
author:
|
||||
name: Sergey Romanenko
|
||||
|
Reference in New Issue
Block a user