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-01 23:15:42 +03:00
parent 028cc858e3
commit 02bff9c07d
8 changed files with 48 additions and 5 deletions

View File

@@ -286,7 +286,7 @@ $flextype['view'] = function ($container) {
};
/**
* Generates and returns the image reponse
* Generates and returns the image response
*/
$app->get('/image/{path:.+}', function (Request $request, Response $response, array $args) use ($flextype) {
return $flextype['images']->getImageResponse($args['path'], $_GET);

View File

@@ -1,5 +1,15 @@
<?php
/**
* @package Flextype
*
* @author Sergey Romanenko <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flextype;
class EmitterTwigExtension extends \Twig_Extension

View File

@@ -1,5 +1,15 @@
<?php
/**
* @package Flextype
*
* @author Sergey Romanenko <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flextype;
class EntriesTwigExtension extends \Twig_Extension

View File

@@ -1,5 +1,15 @@
<?php
/**
* @package Flextype
*
* @author Sergey Romanenko <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flextype;
use Slim\Flash\Messages;
@@ -43,7 +53,7 @@ class FlashTwigExtension extends \Twig_Extension
if (null !== $key) {
return $this->flextype['flash']->getMessage($key);
}
return $this->flextype['flash']->getMessages();
}
}

View File

@@ -1,5 +1,15 @@
<?php
/**
* @package Flextype
*
* @author Sergey Romanenko <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flextype;
use Flextype\Component\I18n\I18n;

View File

@@ -6,8 +6,6 @@ use Slim\Http\Request;
use Slim\Http\Response;
use Flextype\Component\Arr\Arr;
use Flextype\Component\Event\Event;
use Flextype\Component\Registry\Registry;
/**
* Define site plugin routes

View File

@@ -0,0 +1,5 @@
{% extends "themes/default/templates/partials/base.html" %}
{% block content %}
{{ entry.content|raw }}
{% endblock %}

View File

@@ -2,7 +2,7 @@
{% block content %}
<h1>{{ $entry['title'] }}</h1>
<h1>{{ entry.title }}</h1>
{{ entry.content|raw }}