Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pôle IS
Bundles Symfony 2
plantuml-bundle
Commits
2e1b1619
Commit
2e1b1619
authored
May 13, 2016
by
Guillaume Perréal
Browse files
Corrige l'affichage des identifiants.
parent
23467d72
Changes
1
Show whitespace changes
Inline
Side-by-side
Doctrine/FieldDecorator.php
View file @
2e1b1619
...
...
@@ -25,7 +25,8 @@ class FieldDecorator extends AbstractDoctrineDecorator
protected
function
extractItems
(
ReflectionClass
$class
)
{
return
$this
->
withMetadata
(
function
(
$metadata
)
{
function
(
ClassMetadata
$metadata
)
{
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */
return
$metadata
->
fieldMappings
;
},
$class
...
...
@@ -35,17 +36,18 @@ class FieldDecorator extends AbstractDoctrineDecorator
protected
function
decorateItem
(
ReflectionClass
$class
,
NodeInterface
$node
,
ClassVisitorInterface
$visitor
,
$field
)
{
$isIdentifier
=
$this
->
withMetadata
(
function
(
$metadata
)
use
(
$field
)
{
function
(
ClassMetadata
$metadata
)
use
(
$field
)
{
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */
return
$metadata
->
isIdentifier
(
$field
[
'fieldName'
]);
},
$class
);
$node
->
addAttribute
(
new
Field
(
$field
[
'fieldName'
],
$field
[
'type'
],
$field
[
'unique'
],
$field
[
'nullable'
]
$field
[
'nullable'
],
$isIdentifier
));
}
}
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