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:
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -0,0 +1,5 @@
|
||||
{% extends "themes/default/templates/partials/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{{ entry.content|raw }}
|
||||
{% endblock %}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{{ $entry['title'] }}</h1>
|
||||
<h1>{{ entry.title }}</h1>
|
||||
|
||||
{{ entry.content|raw }}
|
||||
|
||||
|
Reference in New Issue
Block a user