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

hey i want to get a list of all the product attributes in the zed GUI I’m assuming i need to use a f

U01JBB8LNTE
U01JBB8LNTE Posts: 207 🧑🏻‍🚀 - Cadet

hey i want to get a list of all the product attributes in the zed GUI I’m assuming i need to use a facade to get ahold of the module interface for product attributes and then call this function: getProductAttributeCollection

    /**
     * @param \Spryker\Zed\Kernel\Container $container
     *
     * @return \Spryker\Zed\Kernel\Container
     */
    public function addAttributeProduct(Container $container): Container
    {
        $container->set(static::FACADE_ATTRIBUTE_PRODUCT, function (Container $container) {
            return $container->getLocator()->attributeProduct()->facade();
        });

        return $container;
    }

we on the right track here?

Comments

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 🧑🏻‍🚀 - Cadet

    or can I just use a transfer object?

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 🧑🏻‍🚀 - Cadet

    end goal is to get back a list of of the translated attribute keys as an array of strings

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)

    To use a Facade in another module it seems like the right way to add it via DependencyProvider. I would likely do the same.

    How far did you come with your goal already?