Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct use of render function for Symfony greater than 2.6 #188

Merged
merged 5 commits into from
Aug 2, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Resources/views/Form/form_admin_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ file that was distributed with this source code.
'code': sonata_admin.field_description.associationadmin.code,
'objectId': sonata_admin.field_description.associationadmin.id(sonata_admin.value),
'uniqid': sonata_admin.field_description.associationadmin.uniqid
})
)}}
})) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there : indent this to the left once and it will be perfect!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you tell me, how am I supposed to know it?
I did not read it in PSR-2 / PSR-1 or Symfony coding standards.
It's just to avoid to make any new mistake

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not php, so nothing to do with the PSR, but indention means that just like you indent content inside a hash, like this :

{% set my hash = {
    'item1',
    'item2',
    'item3'
} %}

you have to do it no matter where the hash is (in our case, inside a function call).

{% elseif sonata_admin.field_description.options.placeholder is defined and sonata_admin.field_description.options.placeholder %}
<span class="inner-field-short-description">
{{ sonata_admin.field_description.options.placeholder|trans({}, 'SonataAdminBundle') }}
Expand Down