2 Commits
test ... v1.0

Author SHA1 Message Date
5094b31ce6 Break up the menu into partials 2023-06-06 15:01:31 +01:00
768318b43a Fixed extension clashes 2023-05-31 16:22:03 +01:00
5 changed files with 10 additions and 45 deletions

View File

@@ -1,38 +0,0 @@
<?php
/*
* AVSDev UF Scheduler (https://avsdev.uk)
*
* @link https://git.avsdev.uk/avsdev/sprinkle-scheduler
* @license https://git.avsdev.uk/avsdev/sprinkle-scheduler/blob/master/LICENSE.md (LGPL-3.0 License)
*/
namespace UserFrosting\Sprinkle\Scheduler\Scheduler\Tasks;
use UserFrosting\Sprinkle\Scheduler\Scheduler\BaseTask;
/**
* Task Class
* Base class for scheduled tasks.
*
* @author Craig Williams (https://avsdev.uk)
*/
class TestTask extends BaseTask
{
/**
* Function used to specify the schedule for the task.
*/
public function schedule()
{
$this->everyMinute();
}
/**
* Function used to specify what the task does.
*/
public function run()
{
$this->ci->debugLogger->debug("running task");
return true;
}
}

View File

@@ -50,7 +50,9 @@ class ServicesProvider
$container->extend('view', function ($view, $c) { $container->extend('view', function ($view, $c) {
$twig = $view->getEnvironment(); $twig = $view->getEnvironment();
$twig->addExtension(new IntlExtension()); if (!$twig->hasExtension('Twig\Extra\Intl\IntlExtension')) {
$twig->addExtension(new IntlExtension());
}
$twig->addExtension(new FormatCronExtension($c)); $twig->addExtension(new FormatCronExtension($c));
return $view; return $view;

View File

@@ -0,0 +1,5 @@
{% if checkAccess('uri_tasks') %}
<li>
<a href="{{site.uri.public}}/tasks"><i class="fas fa-tasks fa-fw"></i> <span>{{ translate("TASK", 2) }}</span></a>
</li>
{% endif %}

View File

@@ -2,9 +2,5 @@
{% block navigation %} {% block navigation %}
{{ parent() }} {{ parent() }}
{% if checkAccess('uri_tasks') %} {% include "navigation/partials/sidebar-tasks.html.twig" %}
<li>
<a href="{{site.uri.public}}/tasks"><i class="fas fa-tasks fa-fw"></i> <span>{{ translate("TASK", 2) }}</span></a>
</li>
{% endif %}
{% endblock %} {% endblock %}