Added pages to view the list of potential jobs
TODO: add ability to run a job & view queued jobs
This commit is contained in:
@@ -11,8 +11,10 @@ namespace UserFrosting\Sprinkle\Worker\ServicesProvider;
|
||||
|
||||
use Illuminate\Container\Container;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
use UserFrosting\Sprinkle\Worker\Worker\Worker;
|
||||
use UserFrosting\Sprinkle\Core\ServicesProvider\BaseServicesProvider;
|
||||
use UserFrosting\Sprinkle\Worker\Jobs\JobInspector;
|
||||
|
||||
/**
|
||||
* Worker services provider.
|
||||
@@ -49,5 +51,20 @@ class ServicesProvider
|
||||
$container['jobInspector'] = function ($c) {
|
||||
return new JobInspector($c);
|
||||
};
|
||||
|
||||
/*
|
||||
* Extends the 'view' service with the HasRole extension for Twig.
|
||||
*
|
||||
* @return \Slim\Views\Twig
|
||||
*/
|
||||
$container->extend('view', function ($view, $c) {
|
||||
$twig = $view->getEnvironment();
|
||||
|
||||
if (!$twig->hasExtension('Twig\Extra\Intl\IntlExtension')) {
|
||||
$twig->addExtension(new IntlExtension());
|
||||
}
|
||||
|
||||
return $view;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user