Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5094b31ce6 | |||
| 768318b43a |
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,9 @@ class ServicesProvider
|
||||
$container->extend('view', function ($view, $c) {
|
||||
$twig = $view->getEnvironment();
|
||||
|
||||
$twig->addExtension(new IntlExtension());
|
||||
if (!$twig->hasExtension('Twig\Extra\Intl\IntlExtension')) {
|
||||
$twig->addExtension(new IntlExtension());
|
||||
}
|
||||
$twig->addExtension(new FormatCronExtension($c));
|
||||
|
||||
return $view;
|
||||
|
||||
5
templates/navigation/partials/sidebar-tasks.html.twig
Normal file
5
templates/navigation/partials/sidebar-tasks.html.twig
Normal 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 %}
|
||||
@@ -2,9 +2,5 @@
|
||||
|
||||
{% block navigation %}
|
||||
{{ parent() }}
|
||||
{% 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 %}
|
||||
{% include "navigation/partials/sidebar-tasks.html.twig" %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user