Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OSE
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
OSE
Commits
62da9362
Commit
62da9362
authored
Dec 17, 2019
by
Antony Le Courtes
Browse files
Options
Downloads
Patches
Plain Diff
- Injection de PhpRenderer au profit du getServiceLocator pour compatibilité ZF3
parent
58e8b7e8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
module/Application/config/contrat.config.php
+3
-2
3 additions, 2 deletions
module/Application/config/contrat.config.php
module/Application/src/Application/Controller/ContratController.php
+13
-3
13 additions, 3 deletions
...lication/src/Application/Controller/ContratController.php
with
16 additions
and
5 deletions
module/Application/config/contrat.config.php
+
3
−
2
View file @
62da9362
...
...
@@ -3,6 +3,7 @@
namespace
Application
;
use
Application\Assertion\ContratAssertion
;
use
Application\Controller\Factory\ContratControllerFactory
;
use
Application\Provider\Privilege\Privileges
;
use
UnicaenAuth\Guard\PrivilegeController
;
use
UnicaenAuth\Provider\Rule\PrivilegeRuleProvider
;
...
...
@@ -330,8 +331,8 @@ return [
],
],
'controllers'
=>
[
'
invokabl
es'
=>
[
'Application\Controller\Contrat'
=>
Controller\
ContratController
::
class
,
'
factori
es'
=>
[
'Application\Controller\Contrat'
=>
ContratController
Factory
::
class
,
],
],
'service_manager'
=>
[
...
...
This diff is collapsed.
Click to expand it.
module/Application/src/Application/Controller/ContratController.php
+
13
−
3
View file @
62da9362
...
...
@@ -30,6 +30,7 @@ use UnicaenApp\View\Model\MessengerViewModel;
use
Application\Entity\Db\Contrat
;
use
Zend\View\Model\JsonModel
;
use
BjyAuthorize\Exception\UnAuthorizedException
;
use
Zend\View\Renderer\PhpRenderer
;
/**
* Description of ContratController
...
...
@@ -53,6 +54,16 @@ class ContratController extends AbstractController
use
ModeleContratServiceAwareTrait
;
use
ModeleFormAwareTrait
;
private
$viewRenderer
;
public
function
__construct
(
PhpRenderer
$viewRenderer
)
{
$this
->
viewRenderer
=
$viewRenderer
;
}
/**
...
...
@@ -332,8 +343,7 @@ class ContratController extends AbstractController
}
if
(
!
empty
(
$contrat
->
getIntervenant
()
->
getEmail
()))
{
$phpRenderer
=
$this
->
getServiceLocator
()
->
get
(
'view_manager'
)
->
getRenderer
();
$html
=
$phpRenderer
->
render
(
'application/contrat/mail/contrat'
,
[
$html
=
$this
->
viewRenderer
->
render
(
'application/contrat/mail/contrat'
,
[
'contrat'
=>
$contrat
,
]);
$message
=
$this
->
getServiceModeleContrat
()
->
prepareMail
(
$contrat
,
$html
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment