Browsed by
Author: Christian Walter

Magento Certified Developer Plus
Use EavSetup to Import Attributes

Use EavSetup to Import Attributes

I recently had the issue that I needed to use the \Magento\Eav\Setup\EavSetup¬†outside the setup-context. To be a bit more concrete, I wanted to import attribute-sets, attributes and attribute-options without using an install-script. My first idea was in magento2 you can easily inject the ‘EavSetup’ via constructor injection and then use it in your own class First try So I injected into my class which worked out well in the development-mode.

But using the same code with the production-mode a…

Read More Read More