- WIP on the Lean package
This commit is contained in:
parent
f72115aab4
commit
1f0edd88d2
|
@ -2,7 +2,7 @@
|
|||
|
||||
use function DI\autowire, DI\create, DI\get;
|
||||
|
||||
use Zend\Diactoros\Response\TextResponse;
|
||||
use Zend\Diactoros\Response\HtmlResponse;
|
||||
|
||||
use TheBugs\JavascriptMiddleware;
|
||||
|
||||
|
@ -68,8 +68,8 @@ return [
|
|||
|
||||
CronardMiddleware::class => function($c) {
|
||||
$cronardMiddleware = new CronardMiddleware($c, getenv('CRON_KEY'), function() : ResponseInterface {
|
||||
return new TextResponse(sprintf("%s - cron task begin...", date('Y-m-d H:i:s')));
|
||||
});
|
||||
return new HtmlResponse(sprintf("%s - cron task begin...", date('Y-m-d H:i:s')));
|
||||
}, [], $c->get(TaskFetcher::class));
|
||||
|
||||
return $cronardMiddleware->fromFile(getenv("META_PATH")."/crontab.php")->fromAnnotations($c->get(TaskFetcher::class));
|
||||
},
|
||||
|
|
|
@ -18,7 +18,8 @@ use Psr\Http\Message\ResponseInterface;
|
|||
|
||||
use TheBugs\Email\MailerInterface;
|
||||
|
||||
use Notes\Route\Annotation\Object\Route as RouteParam,
|
||||
use Notes\Cronard\Annotation\Method\Cronard,
|
||||
Notes\Route\Annotation\Object\Route as RouteParam,
|
||||
Notes\Route\Annotation\Method\Route,
|
||||
Notes\Security\Annotation\Security,
|
||||
Notes\Security\Annotation\Taxus,
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{% php $messageList = array_filter(array_merge($this->contextList, [ $context ?? null ])) %}
|
||||
{% php
|
||||
$messageList = $this->contextList;
|
||||
$context ??= false;
|
||||
|
||||
if ($context && ! in_array($context, $messageList)) {
|
||||
$messageList[] = $context;
|
||||
}
|
||||
%}
|
||||
|
||||
{% if $messageList %}
|
||||
<div class="message-wrapper">{% php
|
||||
|
|
Loading…
Reference in New Issue