Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
renderer
Commits
c01bfd09
Commit
c01bfd09
authored
Oct 11, 2021
by
Jean-Philippe Metivier
Browse files
renommage Content en Template
parent
720e1227
Changes
21
Hide whitespace changes
Inline
Side-by-side
SQL/001_table.sql
0 → 100755
View file @
c01bfd09
-- TABLE DES MACROS
create
table
unicaen_renderer_macro
(
id
serial
not
null
constraint
unicaen_renderer_macro_pk
primary
key
,
code
varchar
(
256
)
not
null
,
description
text
,
variable_name
varchar
(
256
)
not
null
,
methode_name
varchar
(
256
)
not
null
,
histo_creation
timestamp
not
null
,
histo_createur_id
integer
not
null
constraint
unicaen_renderer_macro_user_id_fk
references
"user"
,
histo_modification
timestamp
not
null
,
histo_modificateur_id
integer
not
null
constraint
unicaen_renderer_macro_user_id_fk_2
references
"user"
,
histo_destruction
timestamp
,
histo_destructeur_id
integer
constraint
unicaen_renderer_macro_user_id_fk_3
references
"user"
);
create
unique
index
unicaen_renderer_macro_id_uindex
on
unicaen_renderer_macro
(
id
);
create
unique
index
unicaen_renderer_macro_code_uindex
on
unicaen_renderer_macro
(
code
);
-- TABLE DES CONTENUS
create
table
unicaen_renderer_content
(
id
serial
not
null
constraint
unicaen_content_content_pk
primary
key
,
code
varchar
(
256
)
not
null
,
description
text
,
renderer_type
varchar
(
256
)
not
null
,
renderer_complement
text
not
null
,
renderer_content
text
not
null
,
histo_creation
timestamp
not
null
,
histo_createur_id
integer
not
null
constraint
unicaen_content_content_user_id_fk
references
"user"
,
histo_modification
timestamp
not
null
,
histo_modificateur_id
integer
not
null
constraint
unicaen_content_content_user_id_fk_2
references
"user"
,
histo_destruction
timestamp
,
histo_destructeur_id
integer
constraint
unicaen_content_content_user_id_fk_3
references
"user"
);
create
unique
index
unicaen_content_content_id_uindex
on
unicaen_renderer_content
(
id
);
create
unique
index
unicaen_content_content_code_uindex
on
unicaen_renderer_content
(
code
);
SQL/002_privileges.sql
0 → 100644
View file @
c01bfd09
INSERT
INTO
public
.
unicaen_privilege_categorie
(
code
,
libelle
,
ordre
,
namespace
)
VALUES
(
'documentcontent'
,
'UnicaenDocument - Gestion des contenus'
,
11020
,
'UnicaenRenderer
\\
Provider
\\
Privilege'
);
\ No newline at end of file
config/merged/
contenu
.config.php
→
config/merged/
template
.config.php
View file @
c01bfd09
<?php
use
UnicaenRenderer\Controller\
Contenu
Controller
;
use
UnicaenRenderer\Controller\
Contenu
ControllerFactory
;
use
UnicaenRenderer\Form\
Contenu\Contenu
Form
;
use
UnicaenRenderer\Form\
Contenu\Contenu
FormFactory
;
use
UnicaenRenderer\Form\
Contenu\Contenu
Hydrator
;
use
UnicaenRenderer\Form\
Contenu\Contenu
HydratorFactory
;
use
UnicaenRenderer\Controller\
Template
Controller
;
use
UnicaenRenderer\Controller\
Template
ControllerFactory
;
use
UnicaenRenderer\Form\
Template\Template
Form
;
use
UnicaenRenderer\Form\
Template\Template
FormFactory
;
use
UnicaenRenderer\Form\
Template\Template
Hydrator
;
use
UnicaenRenderer\Form\
Template\Template
HydratorFactory
;
use
UnicaenRenderer\Provider\Privilege\DocumentcontentPrivileges
;
use
UnicaenRenderer\Service\
Contenu\Contenu
Service
;
use
UnicaenRenderer\Service\
Contenu\Contenu
ServiceFactory
;
use
UnicaenRenderer\Service\
Template\Template
Service
;
use
UnicaenRenderer\Service\
Template\Template
ServiceFactory
;
use
UnicaenPrivilege\Guard\PrivilegeController
;
use
Zend\Router\Http\Literal
;
use
Zend\Router\Http\Segment
;
...
...
@@ -18,7 +18,7 @@ return [
'guards'
=>
[
PrivilegeController
::
class
=>
[
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
[
'index'
,
'afficher'
,
...
...
@@ -28,7 +28,7 @@ return [
],
],
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
[
'ajouter'
,
],
...
...
@@ -37,7 +37,7 @@ return [
],
],
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
[
'modifier'
,
],
...
...
@@ -46,7 +46,7 @@ return [
],
],
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
[
'historiser'
,
'restaurer'
,
...
...
@@ -56,7 +56,7 @@ return [
],
],
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
[
'detruire'
,
],
...
...
@@ -77,9 +77,9 @@ return [
'contenu'
=>
[
'pages'
=>
[
'contenu'
=>
[
'label'
=>
'
Contenu
'
,
'route'
=>
'contenu/
contenu
'
,
'resource'
=>
PrivilegeController
::
getResourceId
(
Contenu
Controller
::
class
,
'index'
),
'label'
=>
'
Template
'
,
'route'
=>
'contenu/
template
'
,
'resource'
=>
PrivilegeController
::
getResourceId
(
Template
Controller
::
class
,
'index'
),
'order'
=>
10001
,
],
],
...
...
@@ -98,9 +98,9 @@ return [
'contenu'
=>
[
'type'
=>
Literal
::
class
,
'options'
=>
[
'route'
=>
'/
contenu
'
,
'route'
=>
'/
template
'
,
'defaults'
=>
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
'index'
,
],
],
...
...
@@ -109,9 +109,9 @@ return [
'afficher'
=>
[
'type'
=>
Segment
::
class
,
'options'
=>
[
'route'
=>
'/afficher/:
contenu
'
,
'route'
=>
'/afficher/:
template
'
,
'defaults'
=>
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
'afficher'
,
],
],
...
...
@@ -121,7 +121,7 @@ return [
'options'
=>
[
'route'
=>
'/ajouter'
,
'defaults'
=>
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
'ajouter'
,
],
],
...
...
@@ -129,9 +129,9 @@ return [
'modifier'
=>
[
'type'
=>
Segment
::
class
,
'options'
=>
[
'route'
=>
'/modifier/:
contenu
'
,
'route'
=>
'/modifier/:
template
'
,
'defaults'
=>
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
'modifier'
,
],
],
...
...
@@ -139,9 +139,9 @@ return [
'restaurer'
=>
[
'type'
=>
Segment
::
class
,
'options'
=>
[
'route'
=>
'/restaurer/:
contenu
'
,
'route'
=>
'/restaurer/:
template
'
,
'defaults'
=>
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
'restaurer'
,
],
],
...
...
@@ -149,9 +149,9 @@ return [
'historiser'
=>
[
'type'
=>
Segment
::
class
,
'options'
=>
[
'route'
=>
'/historiser/:
contenu
'
,
'route'
=>
'/historiser/:
template
'
,
'defaults'
=>
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
'historiser'
,
],
],
...
...
@@ -159,9 +159,9 @@ return [
'detruire'
=>
[
'type'
=>
Segment
::
class
,
'options'
=>
[
'route'
=>
'/detruire/:
contenu
'
,
'route'
=>
'/detruire/:
template
'
,
'defaults'
=>
[
'controller'
=>
Contenu
Controller
::
class
,
'controller'
=>
Template
Controller
::
class
,
'action'
=>
'detruire'
,
],
],
...
...
@@ -175,22 +175,22 @@ return [
'service_manager'
=>
[
'factories'
=>
[
Contenu
Service
::
class
=>
Contenu
ServiceFactory
::
class
,
Template
Service
::
class
=>
Template
ServiceFactory
::
class
,
],
],
'form_elements'
=>
[
'factories'
=>
[
Contenu
Form
::
class
=>
Contenu
FormFactory
::
class
,
Template
Form
::
class
=>
Template
FormFactory
::
class
,
],
],
'hydrators'
=>
[
'factories'
=>
[
Contenu
Hydrator
::
class
=>
Contenu
HydratorFactory
::
class
,
Template
Hydrator
::
class
=>
Template
HydratorFactory
::
class
,
],
],
'controllers'
=>
[
'factories'
=>
[
Contenu
Controller
::
class
=>
Contenu
ControllerFactory
::
class
,
Template
Controller
::
class
=>
Template
ControllerFactory
::
class
,
]
],
];
src/UnicaenRenderer/Controller/
Contenu
Controller.php
→
src/UnicaenRenderer/Controller/
Template
Controller.php
View file @
c01bfd09
...
...
@@ -2,59 +2,59 @@
namespace
UnicaenRenderer\Controller
;
use
UnicaenRenderer\Entity\Db\
Content
;
use
UnicaenRenderer\Form\
Contenu\Contenu
FormAwareTrait
;
use
UnicaenRenderer\Service\
Contenu\Contenu
ServiceAwareTrait
;
use
UnicaenRenderer\Entity\Db\
Template
;
use
UnicaenRenderer\Form\
Template\Template
FormAwareTrait
;
use
UnicaenRenderer\Service\
Template\Template
ServiceAwareTrait
;
use
UnicaenRenderer\Service\Macro\MacroServiceAwareTrait
;
use
Zend\Http\Request
;
use
Zend\Mvc\Controller\AbstractActionController
;
use
Zend\View\Model\ViewModel
;
class
Contenu
Controller
extends
AbstractActionController
{
use
Contenu
ServiceAwareTrait
;
class
Template
Controller
extends
AbstractActionController
{
use
Template
ServiceAwareTrait
;
use
MacroServiceAwareTrait
;
use
Contenu
FormAwareTrait
;
use
Template
FormAwareTrait
;
public
function
indexAction
()
{
$
contenu
s
=
$this
->
get
Contenu
Service
()
->
get
Contenu
s
();
$
template
s
=
$this
->
get
Template
Service
()
->
get
Template
s
();
return
new
ViewModel
([
'
contenus'
=>
$contenu
s
,
'
templates'
=>
$template
s
,
]);
}
public
function
afficherAction
()
{
$
contenu
=
$this
->
get
Contenu
Service
()
->
getRequested
Contenu
(
$this
);
$
template
=
$this
->
get
Template
Service
()
->
getRequested
Template
(
$this
);
return
new
ViewModel
([
'title'
=>
"Affichage du
contenu
"
,
'contenu'
=>
$
contenu
,
'title'
=>
"Affichage du
template
"
,
'contenu'
=>
$
template
,
]);
}
public
function
ajouterAction
()
{
$
contenu
=
new
Content
();
$
template
=
new
Template
();
$form
=
$this
->
get
Contenu
Form
();
$form
->
setAttribute
(
'action'
,
$this
->
url
()
->
fromRoute
(
'contenu/
contenu
/ajouter'
,
[],
[],
true
));
$form
->
bind
(
$
contenu
);
$form
=
$this
->
get
Template
Form
();
$form
->
setAttribute
(
'action'
,
$this
->
url
()
->
fromRoute
(
'contenu/
template
/ajouter'
,
[],
[],
true
));
$form
->
bind
(
$
template
);
$request
=
$this
->
getRequest
();
if
(
$request
->
isPost
())
{
$data
=
$request
->
getPost
();
$form
->
setData
(
$data
);
if
(
$form
->
isValid
())
{
$this
->
get
Contenu
Service
()
->
create
(
$
contenu
);
$this
->
get
Template
Service
()
->
create
(
$
template
);
}
}
$vm
=
new
ViewModel
();
$vm
->
setTemplate
(
'unicaen-renderer/
contenu
/modifier'
);
$vm
->
setTemplate
(
'unicaen-renderer/
template
/modifier'
);
$vm
->
setVariables
([
'title'
=>
"Création d'un
contenu
"
,
'title'
=>
"Création d'un
template
"
,
'form'
=>
$form
,
]);
return
$vm
;
...
...
@@ -62,64 +62,64 @@ class ContenuController extends AbstractActionController {
public
function
modifierAction
()
{
$
contenu
=
$this
->
get
Contenu
Service
()
->
getRequested
Contenu
(
$this
);
$
template
=
$this
->
get
Template
Service
()
->
getRequested
Template
(
$this
);
$form
=
$this
->
get
Contenu
Form
();
$form
->
setAttribute
(
'action'
,
$this
->
url
()
->
fromRoute
(
'contenu/
contenu
/modifier'
,
[
'
contenu'
=>
$contenu
->
getId
()],
[],
true
));
$form
->
bind
(
$
contenu
);
$form
=
$this
->
get
Template
Form
();
$form
->
setAttribute
(
'action'
,
$this
->
url
()
->
fromRoute
(
'contenu/
template
/modifier'
,
[
'
template'
=>
$template
->
getId
()],
[],
true
));
$form
->
bind
(
$
template
);
$request
=
$this
->
getRequest
();
if
(
$request
->
isPost
())
{
$data
=
$request
->
getPost
();
$form
->
setData
(
$data
);
if
(
$form
->
isValid
())
{
$this
->
get
Contenu
Service
()
->
update
(
$
contenu
);
$this
->
get
Template
Service
()
->
update
(
$
template
);
}
}
return
new
ViewModel
([
'title'
=>
"Modification d'un
contenu
"
,
'title'
=>
"Modification d'un
template
"
,
'form'
=>
$form
,
]);
}
public
function
historiserAction
()
{
$
contenu
=
$this
->
get
Contenu
Service
()
->
getRequested
Contenu
(
$this
);
$this
->
get
Contenu
Service
()
->
historise
(
$
contenu
);
$
template
=
$this
->
get
Template
Service
()
->
getRequested
Template
(
$this
);
$this
->
get
Template
Service
()
->
historise
(
$
template
);
return
$this
->
redirect
()
->
toRoute
(
'contenu/
contenu
'
,
[],
[],
true
);
return
$this
->
redirect
()
->
toRoute
(
'contenu/
template
'
,
[],
[],
true
);
}
public
function
restaurerAction
()
{
$
contenu
=
$this
->
get
Contenu
Service
()
->
getRequested
Contenu
(
$this
);
$this
->
get
Contenu
Service
()
->
restore
(
$
contenu
);
$
template
=
$this
->
get
Template
Service
()
->
getRequested
Template
(
$this
);
$this
->
get
Template
Service
()
->
restore
(
$
template
);
return
$this
->
redirect
()
->
toRoute
(
'contenu/
contenu
'
,
[],
[],
true
);
return
$this
->
redirect
()
->
toRoute
(
'contenu/
template
'
,
[],
[],
true
);
}
public
function
detruireAction
()
{
$
contenu
=
$this
->
get
Contenu
Service
()
->
getRequested
Contenu
(
$this
);
$
template
=
$this
->
get
Template
Service
()
->
getRequested
Template
(
$this
);
/** @var Request $request */
$request
=
$this
->
getRequest
();
if
(
$request
->
isPost
())
{
$data
=
$request
->
getPost
();
if
(
$data
[
"reponse"
]
===
"oui"
)
{
$this
->
get
Contenu
Service
()
->
delete
(
$
contenu
);
$this
->
get
Template
Service
()
->
delete
(
$
template
);
}
exit
();
}
$vm
=
new
ViewModel
();
if
(
$
contenu
!==
null
)
{
if
(
$
template
!==
null
)
{
$vm
->
setTemplate
(
'unicaen-renderer/default/confirmation'
);
$vm
->
setVariables
([
'title'
=>
"Suppression du
contenu ["
.
$contenu
->
getCode
()
.
"]"
,
'title'
=>
"Suppression du
template ["
.
$template
->
getCode
()
.
"]"
,
'text'
=>
"La suppression est définitive êtes-vous sûr·e de vouloir continuer ?"
,
'action'
=>
$this
->
url
()
->
fromRoute
(
'contenu/
contenu
/detruire'
,
[
"
contenu"
=>
$contenu
->
getId
()],
[],
true
),
'action'
=>
$this
->
url
()
->
fromRoute
(
'contenu/
template
/detruire'
,
[
"
template"
=>
$template
->
getId
()],
[],
true
),
]);
}
return
$vm
;
...
...
src/UnicaenRenderer/Controller/
Contenu
ControllerFactory.php
→
src/UnicaenRenderer/Controller/
Template
ControllerFactory.php
View file @
c01bfd09
...
...
@@ -3,30 +3,30 @@
namespace
UnicaenRenderer\Controller
;
use
Interop\Container\ContainerInterface
;
use
UnicaenRenderer\Form\
Contenu\Contenu
Form
;
use
UnicaenRenderer\Service\
Contenu\Contenu
Service
;
use
UnicaenRenderer\Form\
Template\Template
Form
;
use
UnicaenRenderer\Service\
Template\Template
Service
;
class
Contenu
ControllerFactory
{
class
Template
ControllerFactory
{
/**
* @param ContainerInterface $container
* @return
Contenu
Controller
* @return
Template
Controller
*/
public
function
__invoke
(
ContainerInterface
$container
)
{
/**
* @var
Contenu
Service $
contenu
Service
* @var
Template
Service $
template
Service
*/
$
contenu
Service
=
$container
->
get
(
Contenu
Service
::
class
);
$
template
Service
=
$container
->
get
(
Template
Service
::
class
);
/**
* @var
Contenu
Form $contentForm
* @var
Template
Form $contentForm
*/
$contentForm
=
$container
->
get
(
'FormElementManager'
)
->
get
(
Contenu
Form
::
class
);
$contentForm
=
$container
->
get
(
'FormElementManager'
)
->
get
(
Template
Form
::
class
);
$controller
=
new
Contenu
Controller
();
$controller
->
set
Contenu
Service
(
$
contenu
Service
);
$controller
->
set
Contenu
Form
(
$contentForm
);
$controller
=
new
Template
Controller
();
$controller
->
set
Template
Service
(
$
template
Service
);
$controller
->
set
Template
Form
(
$contentForm
);
return
$controller
;
}
}
\ No newline at end of file
src/UnicaenRenderer/Entity/Db/Mapping/UnicaenRenderer.Entity.Db.
Content
.dcm.xml
→
src/UnicaenRenderer/Entity/Db/Mapping/UnicaenRenderer.Entity.Db.
Template
.dcm.xml
View file @
c01bfd09
<?xml version="1.0" encoding="utf-8" ?>
<doctrine-mapping
xmlns=
"http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"
>
<entity
name=
"UnicaenRenderer\Entity\Db\
Content
"
table=
"unicaen_renderer_
content
"
>
<entity
name=
"UnicaenRenderer\Entity\Db\
Template
"
table=
"unicaen_renderer_
template
"
>
<id
name=
"id"
column=
"id"
type=
"integer"
>
<generator
strategy=
"IDENTITY"
/>
...
...
src/UnicaenRenderer/Entity/Db/
Content
.php
→
src/UnicaenRenderer/Entity/Db/
Template
.php
View file @
c01bfd09
...
...
@@ -5,7 +5,7 @@ namespace UnicaenRenderer\Entity\Db;
use
UnicaenUtilisateur\Entity\HistoriqueAwareInterface
;
use
UnicaenUtilisateur\Entity\HistoriqueAwareTrait
;
class
Content
implements
HistoriqueAwareInterface
{
class
Template
implements
HistoriqueAwareInterface
{
use
HistoriqueAwareTrait
;
const
TYPE_TXT
=
'texte'
;
...
...
@@ -37,9 +37,9 @@ class Content implements HistoriqueAwareInterface {
/**
* @param int $id
* @return
Content
* @return
Template
*/
public
function
setId
(
int
$id
)
:
Content
public
function
setId
(
int
$id
)
:
Template
{
$this
->
id
=
$id
;
return
$this
;
...
...
@@ -55,9 +55,9 @@ class Content implements HistoriqueAwareInterface {
/**
* @param string|null $code
* @return
Content
* @return
Template
*/
public
function
setCode
(
?string
$code
)
:
Content
public
function
setCode
(
?string
$code
)
:
Template
{
$this
->
code
=
$code
;
return
$this
;
...
...
@@ -73,9 +73,9 @@ class Content implements HistoriqueAwareInterface {
/**
* @param string|null $description
* @return
Content
* @return
Template
*/
public
function
setDescription
(
?string
$description
)
:
Content
public
function
setDescription
(
?string
$description
)
:
Template
{
$this
->
description
=
$description
;
return
$this
;
...
...
@@ -91,9 +91,9 @@ class Content implements HistoriqueAwareInterface {
/**
* @param string|null $type
* @return
Content
* @return
Template
*/
public
function
setType
(
?string
$type
)
:
Content
public
function
setType
(
?string
$type
)
:
Template
{
$this
->
type
=
$type
;
return
$this
;
...
...
@@ -109,9 +109,9 @@ class Content implements HistoriqueAwareInterface {
/**
* @param string|null $complement
* @return
Content
* @return
Template
*/
public
function
setComplement
(
?string
$complement
)
:
Content
public
function
setComplement
(
?string
$complement
)
:
Template
{
$this
->
complement
=
$complement
;
return
$this
;
...
...
@@ -120,16 +120,16 @@ class Content implements HistoriqueAwareInterface {
/**
* @return string
*/
public
function
get
Content
()
:
?string
public
function
get
Template
()
:
?string
{
return
$this
->
content
;
}
/**
* @param string|null $content
* @return
Content
* @return
Template
*/
public
function
set
Content
(
?string
$content
)
:
Content
public
function
set
Template
(
?string
$content
)
:
Template
{
$this
->
content
=
$content
;
return
$this
;
...
...
@@ -145,9 +145,9 @@ class Content implements HistoriqueAwareInterface {
/**
* @param string|null $css
* @return
Content
* @return
Template
*/
public
function
setCss
(
?string
$css
):
Content
public
function
setCss
(
?string
$css
):
Template
{
$this
->
css
=
$css
;
return
$this
;
...
...
src/UnicaenRenderer/Form/Contenu/ContenuFormAwareTrait.php
deleted
100755 → 0
View file @
720e1227
<?php
namespace
UnicaenRenderer\Form\Contenu
;
trait
ContenuFormAwareTrait
{
/** @var ContenuForm */
private
$contenuForm
;
/**
* @return ContenuForm
*/
public
function
getContenuForm
():
ContenuForm
{
return
$this
->
contenuForm
;
}
/**
* @param ContenuForm $contenuForm
* @return ContenuForm
*/
public
function
setContenuForm
(
ContenuForm
$contenuForm
)
{
$this
->
contenuForm
=
$contenuForm
;
return
$this
->
contenuForm
;
}
}
\ No newline at end of file
src/UnicaenRenderer/Form/
Contenu/Contenu
Form.php
→
src/UnicaenRenderer/Form/
Template/Template
Form.php
View file @
c01bfd09
<?php
namespace
UnicaenRenderer\Form\
Contenu
;
namespace
UnicaenRenderer\Form\
Template
;
use
UnicaenApp\Service\EntityManagerAwareTrait
;
use
UnicaenRenderer\Entity\Db\
Content
;
use
UnicaenRenderer\Entity\Db\
Template
;
use
UnicaenRenderer\Entity\Db\Macro
;
use
UnicaenRenderer\Service\Macro\MacroServiceAwareTrait
;
use
Zend\Form\Element\Button
;
...
...
@@ -14,7 +14,7 @@ use Zend\Form\Form;
use
Zend\InputFilter\Factory
;
use
Zend\Validator\Callback
;
class
Contenu
Form
extends
Form
{
class
Template
Form
extends
Form
{
use
EntityManagerAwareTrait
;
use
MacroServiceAwareTrait
;
...
...
@@ -51,9 +51,9 @@ class ContenuForm extends Form {
'label'
=>
'Type * : '
,
'empty_option'
=>
"Sélectionner un type de contenu"
,
'value_options'
=>
[
Content
::
TYPE_PDF
=>
"Fichier PDF"
,
Content
::
TYPE_TXT
=>
"
Contenu
textuel"
,
Content
::
TYPE_MAIL
=>
"Courrier électronique"
,
Template
::
TYPE_PDF
=>
"Fichier PDF"
,
Template
::
TYPE_TXT
=>
"
Template
textuel"
,