Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elloha
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
elloha
Commits
4c5ea62a
Commit
4c5ea62a
authored
Dec 10, 2018
by
Frédéric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(all): form template override
parent
08e1afd7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
config.yml.dist
config/config.yml.dist
+1
-0
EllohaExtension.php
src/EllohaExtension.php
+7
-2
No files found.
config/config.yml.dist
View file @
4c5ea62a
IdBookEngine : "b68c6848-b7d9-4083-91f0-3de6f065280e"
IdBookEngine : "b68c6848-b7d9-4083-91f0-3de6f065280e"
form_template: "elloha/form.html.twig"
searchable_contenttypes:
searchable_contenttypes:
- HCO
- HCO
- HLO
- HLO
...
...
src/EllohaExtension.php
View file @
4c5ea62a
...
@@ -92,7 +92,7 @@ class EllohaExtension extends SimpleExtension
...
@@ -92,7 +92,7 @@ class EllohaExtension extends SimpleExtension
];
];
}
}
/**
/**
* @return string
* @return string
*/
*/
public
function
resaForm
()
public
function
resaForm
()
...
@@ -103,10 +103,15 @@ class EllohaExtension extends SimpleExtension
...
@@ -103,10 +103,15 @@ class EllohaExtension extends SimpleExtension
'resaTypes'
=>
$this
->
_getResaTypesForOptions
(),
'resaTypes'
=>
$this
->
_getResaTypesForOptions
(),
])
->
getForm
();
])
->
getForm
();
try
{
return
$this
->
renderTemplate
(
$this
->
getConfig
()[
'form_template'
],
[
'form'
=>
$form
->
createView
()
]);
}
catch
(
\Exception
$e
)
{
return
$this
->
renderTemplate
(
'@elloha/Frontend/generateForm.html.twig'
,
[
return
$this
->
renderTemplate
(
'@elloha/Frontend/generateForm.html.twig'
,
[
'form'
=>
$form
->
createView
()
'form'
=>
$form
->
createView
()
]);
]);
}
}
}
/**
/**
...
...
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