Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
Tourinsoft
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bolt Extensions
Tourinsoft
Commits
992fda3d
Commit
992fda3d
authored
May 11, 2018
by
Frédéric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync controller
parent
1770d5d2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
FluxController.php
src/Controller/Backend/FluxController.php
+11
-8
list.html.twig
templates/Backend/flux/list.html.twig
+0
-0
No files found.
src/Controller/Backend/FluxController.php
View file @
992fda3d
...
@@ -64,7 +64,7 @@ class FluxController extends BackendBase
...
@@ -64,7 +64,7 @@ class FluxController extends BackendBase
* @return \Bolt\Response\TemplateResponse|\Bolt\Response\TemplateView|\Symfony\Component\HttpFoundation\RedirectResponse
* @return \Bolt\Response\TemplateResponse|\Bolt\Response\TemplateView|\Symfony\Component\HttpFoundation\RedirectResponse
* @throws \Exception
* @throws \Exception
*/
*/
public
function
add
(
Request
$request
)
{
public
function
add
(
Request
$request
)
{
$flux
=
$this
->
getRepository
(
Flux
::
class
)
->
findAll
();
$flux
=
$this
->
getRepository
(
Flux
::
class
)
->
findAll
();
$form
=
$this
->
createForm
(
'Bolt\Extension\Appolo\Tourinsoft\Form\FluxType'
,
new
Flux
());
$form
=
$this
->
createForm
(
'Bolt\Extension\Appolo\Tourinsoft\Form\FluxType'
,
new
Flux
());
...
@@ -88,6 +88,8 @@ class FluxController extends BackendBase
...
@@ -88,6 +88,8 @@ class FluxController extends BackendBase
/**
/**
* Edit ('/edit/:id')
* Edit ('/edit/:id')
* @param Request $request
* @return \Bolt\Response\TemplateResponse|\Bolt\Response\TemplateView|\Symfony\Component\HttpFoundation\RedirectResponse
*/
*/
public
function
edit
(
Request
$request
)
{
public
function
edit
(
Request
$request
)
{
...
@@ -116,18 +118,19 @@ class FluxController extends BackendBase
...
@@ -116,18 +118,19 @@ class FluxController extends BackendBase
/**
/**
* Synchornisation ('/sync/:id')
* Synchornisation ('/sync/:id')
*/
*/
public
function
sync
(
$id
)
{
public
function
sync
(
Request
$request
)
{
$flux
=
new
Flux
();
$flux
->
setTitle
(
'Mon Titre'
);
$flux
->
setContentType
(
'test2'
);
$flux
->
setEnabled
(
true
);
$flux
->
setKey
(
'2184659e-c7b0-4e8c-8f08-0813bbda30a6'
);
$flux
=
$this
->
getRepository
(
Flux
::
class
)
->
find
(
$request
->
get
(
'id'
));
if
(
!
$flux
){
$this
->
app
[
'session'
]
->
getFlashBag
()
->
add
(
'error'
,
'Modification impossible: Flux inexistant'
);
}
else
{
$sync
=
new
Synchronisation
(
$this
->
config
,
$this
->
application
,
$flux
);
$sync
=
new
Synchronisation
(
$this
->
config
,
$this
->
application
,
$flux
);
$sync
->
sync
();
$sync
->
sync
();
}
}
return
$this
->
redirectToRoute
(
'tourinsoft_admin_flux_index'
);
}
/**
/**
* Delete ('/delete/:id')
* Delete ('/delete/:id')
* @param Request $request
* @param Request $request
...
...
templates/Backend/flux/list.html.twig
View file @
992fda3d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment