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

Hi all πŸ™‚ I have the following scenario and i would like to know how to solve i

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

Hi all πŸ™‚ I have the following scenario and i would like to know how to solve it properly. What is the spryker way to override a core method on project level for example https://github.com/spryker/cms/blob/master/src/Spryker/Zed/Cms/Business/CmsBusinessFactory.php#L140 which returns an interface?

Comments

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

    I've found https://documentation.spryker.com/tutorials/howtos/ht-extend-inuse-core.htm but that's not working because of the required interface

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

    Hey Benedict, where is the interface required? As an option, you can introduce an interface on a project level that would inherit CmsToTouchFacadeInterface

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    there's a well known specific with bridges, in general you don't need them on project level but in case of factory method you would need to override bridge in project as well

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

    Ok, that's what I thought. Since Spryker sugguests to avoid bridges on project level i was a little bit confused πŸ™‚

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

    Thank you guys

  • rshopin
    rshopin Sprykee Posts: 32 πŸ§‘πŸ»β€πŸš€ - Cadet

    Or implement Bridge interface in your class

    e.g.:


  • rshopin
    rshopin Sprykee Posts: 32 πŸ§‘πŸ»β€πŸš€ - Cadet

    and get rid of bridge in dependencyProvider