How to get .json of class for import


#1

I’m going to guess there is an obvious answer to this but the console has a pimcore:definition:import:class to import a .json file of the class; however, I can’t find anywhere that states where that json file comes from or how to create it?

The docs describing the import should really be more clear on this.
Docs say, “As an alternative also class export to json-files and the class import commands can be used.” but mention nothing about how you derive the json files in the first place. bin/console list |grep export shows natta.


#2

thats created in the backend using the class-editor


#3

Thanks for the direction, but I am still unclear. So, is this saving the object within the class editor along with its data or the class definition? I suppose the definition is within the definition_[class].php. I believe I’m mixing up what I’m trying to do as I was wanting to get a snapshot of the definition and now that I think about it, that would be in the definition_… class file.


#4

I see it now, “export” next to “save”. Doh. Kind of painful to do it for each one…


#5

There is a bunch Export as well


#6

you can also use the definition_[class].php files and the classes-rebuild command.