ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 2 replies, has 2 voices, and was last updated by  jakabadambalazs 2 years, 4 months ago.

  • Creator
    Topic
  • #7095

    jakabadambalazs
    Participant

    Hi,

    I have this in services.yml:

    this in a datagrid:

    and this in the helpe class defined in services:

    As you can guess I’d like to remove the $ListGroupName = "ACCOUNT_TYPE"; from my helper class and define in in the filter section of my datagrid definition.

    How would you do that?

    tnx
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #7550

    Alexandr Smaga
    Participant

    Hello @jakabadambalazs !

    Expression processed by this resolver. So for now you can make decision based on one of following data: grid name, config key where expression placed and full array starting from parent node. It seems for me that only grid name is useful for you now.

    We have plans to move on our new resolver from config component that allow to configure any count of parameters to pass to the method call, but it’s not in the nearest time, so any help on this is appreciated.

    #7554

    jakabadambalazs
    Participant

    Thanks, I have checked on SystemAwareResolver but suddenly (as many times before it has happened to me with Sf) I realized that I was over-complicating something that is quite simple really.

    I have injected my ListItemRepository into the ‘helper’ service:

    and I modified the above method with a ‘very ugly’ but functional version:

    and now I can use it from datagrid.yml like this:

    The thing is ‘ugly’ because I did not have time to create a specific type for this so I am using the ‘entity’ type and I am (improperly) relying on the ‘attr’ property.

    but it works – just needs some polishing up

    Thanks anyways. As for allowing to pass parameters to method call I would not know where to start – for now I am just getting a taste of OroPlatform and for me it seems a task bigger than my present capabilities.

    Thanks for your help
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.