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..

Hello everyone! Does anybody know it there is a way to add custom methods/interfaces to the generate

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

Hello everyone!
Does anybody know it there is a way to add custom methods/interfaces to the generated transfer objects?

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    Transfers are not meant to include any business code. Therefore custom methods does not make much of sense and are not supported.

    Interfaces would be nice, but same as above, they are not supported.

    We already tried to modify the transfer object generation. It’s possible but only to a small decree.

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

    πŸ‘ thanks for the info!

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

    We did this at one point -- adding return types

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

    (apparently)
    then there is a sub directory here called Templates with the overridden templates (see the parent class)

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

    ah, I see

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

    thanks! for now I have solved it by wrapping the transfer object into another one controlled by me (this might not work for others, but in our case was enough)

Welcome!

It looks like you're new here. Sign in or register to get started.