Use expressionLanguage into ParametersParser #1180

Merged
merged 4 commits into from Mar 8, 2014

Conversation

Projects
None yet
5 participants
Contributor

amenophis commented Mar 7, 2014

Tries about this implementation : #1179

@Sylius, what do you think ?

my_event_index:
    pattern: /
    methods: [GET]
    defaults:
        _controller: my.controller.event:indexAction
        _sylius:
            criteria:
                owner: "expression:service('security.context').getToken().getUser()"

my_event_show:
    pattern: /{id}
    methods: [GET]
    defaults:
        _controller: my.controller.event:showAction
        _sylius:
            criteria:
                owner: "expression:service('security.context').getToken().getUser()"
Owner

pjedrzejewski commented Mar 8, 2014

Ahhh, nice! Maybe we could use shorter "expr"? Usually I am not a fan of abberivations, but this will be consistent with other libraries. Nice feature Jeremy, thanks!

Contributor

amenophis commented Mar 8, 2014

@pjedrzejewski done ! You can merge it :)

Contributor

aRn0D commented Mar 8, 2014

IT seems good! Good job!

@stloyd stloyd added the Enhancement label Mar 8, 2014

@stloyd stloyd added this to the 1.0.0-BETA1 milestone Mar 8, 2014

pjedrzejewski added a commit that referenced this pull request Mar 8, 2014

Merge pull request #1180 from amenophis/expression
Use expressionLanguage into ParametersParser

@pjedrzejewski pjedrzejewski merged commit f809187 into Sylius:master Mar 8, 2014

1 check passed

default Scrutinizer: 5 added/modified code elements — Travis: Passed
Details
Owner

pjedrzejewski commented Mar 8, 2014

Thank you Jeremy! This is really flexible, could you please submit a doc PR?

Contributor

umpirsky commented Mar 8, 2014

Wow! Great job! 👍

Contributor

amenophis commented Mar 8, 2014

Thanks all for congrats :-)
I will write doc PR tomorrow or Monday !

Have all a good week-end !

Contributor

amenophis commented Mar 9, 2014

@pjedrzejewski how do you want I write the doc PR ? May I create a new page about the _sylius confing node parsing ? or simply add a note after all criteria explanations on each page ?

@amenophis amenophis deleted the amenophis:expression branch Apr 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment