Commit 6b0eab43 by Frédéric

Pour Vaness

parent d5bd3aa6
......@@ -13,8 +13,8 @@
"license": "MIT",
"authors": [
{
"name": "",
"email": "you@example.com"
"name": "Appolo",
"email": "support@appolo.fr"
}
],
"minimum-stability": "dev",
......
<?php
namespace Bolt\Extension\Appolo\Tourinsoft\Controller\Backend;
use Bolt\Application;
use Bolt\Controller\Backend\BackendBase;
use Silex\ControllerCollection;
class FluxController extends BackendBase
{
/**
* @var Application
*/
private $application;
/**
* FluxController constructor.
* @param Application $application
*/
public function __construct(Application $application)
{
$this->application = $application;
}
/**
* @param ControllerCollection $c
* @return ControllerCollection
*/
protected function addRoutes(ControllerCollection $c)
{
$c->match('/', 'index')->bind('tourinsoft_admin_flux_index');
$c->match('/add', 'add')->bind('tourinsoft_admin_flux_add');
$c->match('/edit/{id}', 'edit')->bind('tourinsoft_admin_flux_edit');
$c->match('/sync/{id}', 'sync')->bind('tourinsoft_admin_flux_sync');
$c->match('/delete/{id}', 'delete')->bind('tourinsoft_admin_flux_delete');
return $c;
}
/**
* Index ('/')
*/
public function index() {
dump('fuck');
}
/**
* Add ('/add')
*/
public function add() {}
/**
* Edit ('/edit/:id')
*/
public function edit($id) {
dump($id);
}
/**
* Synchornisation ('/sync/:id')
*/
public function sync($id) {
}
/**
* Delete ('/delete/:id')
*/
public function delete($id) {}
}
\ No newline at end of file
......@@ -2,6 +2,7 @@
namespace Bolt\Extension\Appolo\Tourinsoft;
use Bolt\Extension\Appolo\Tourinsoft\Controller\Backend\FluxController;
use Bolt\Extension\SimpleExtension;
use Bolt\Menu\MenuEntry;
......@@ -12,18 +13,12 @@ use Bolt\Menu\MenuEntry;
*/
class TourinsoftExtension extends SimpleExtension
{
public function getFuck() {
/*dump($this->getConfig());*/
return 'Wazaaaaaa';
}
/**
* @return array
*/
protected function registerMenuEntries()
{
$menu = new MenuEntry('Tourinsoft', '');
$menu = new MenuEntry('Tourinsoft', '/bolt/tourinsoft');
$menu->setLabel('Api TourinSoft')
->setIcon('fa: fa-database')
->setPermission('settings');
......@@ -39,19 +34,8 @@ class TourinsoftExtension extends SimpleExtension
*/
protected function registerBackendControllers()
{
/*return [
'/tourinsoft' => new Controller\Backend\TourinsoftController($this->getConfig()),
];*/
}
/**
* {@inheritdoc}
*/
protected function registerTwigFunctions()
{
return [
'getFuck' => 'getFuck'
'/tourinsoft' => new FluxController($this->getContainer()),
];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment