What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

could someone enlighten me what could the array returned by `Spryker\Zed\Oms\Dependency\Plugin\Comma

U01G4K5E0J2
U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet

could someone enlighten me what could the array returned by Spryker\Zed\Oms\Dependency\Plugin\Command\CommandByOOrder contain?
Docs and docblock seem to omit that piece of information
https://documentation.spryker.com/docs/t-oms-and-state-machines-spryker-commerce-os

Comments

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hey Piotr, you can find an answer here:
    https://documentation.spryker.com/docs/state-machine-cookbook#commands
    at the end of the paragraph

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited February 2021

    One little trick regarding searching the documentation:
    using google f.e. β€œsite:documentation.spryker.com CommandByOrder” gives better (more relevant) results comparing to the internal documentation search. In this particular case, relevancy is the same, but the visibility of the returned results is much better

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited February 2021

    I m sorry, Ive read #commands paragraph twice and failed to find an explanation on what CommandByOrderInterface exactly returns

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet

    except that it is an array

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet

    could you maybe paste relevant fragment here?

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    Is it spelled correctly, Command-by-OO-rderInterface?

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited February 2021

    and that’s the essence of your question?

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet

    sorry

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet
    Spryker\Zed\Oms\Dependency\Plugin\Command\CommandByOrderInterface
    
  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet

    docblock states, that an array is returned

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet

    I wonder what I can put in that array or what I can expect from other plugins to put there

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    ah, I misunderstood your question either, sorry.
    I tried to find if this array is used some where in core - and couldn’t find. So this methods \Spryker\Zed\Oms\Business\OrderStateMachine\OrderStateMachine::triggerEvent and \Spryker\Zed\Oms\Business\OrderStateMachine\OrderStateMachine::triggerEventForNewItem are returning the results outside (through the Facade). So you’re free to return whatever you want to back to your project’s code usages, or return [] if you don’t need any result

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited February 2021

    I’m personally never tried (never had a case) to return anything back, so in my case it was []

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet

    I see, athank you