0 votes

I would really love more advanced field templates, that had the ability to somehow configure ORM settings for things like doctrine extensions and associations needed.

in Feature Request by (170 points)

Skipper templates are really powerful and almost everything you can do in GUI can be done in templates.

Please describe your needs more in detail, I believe we will find a solution.

In the template, you can use everything like in the Skipper project XML file. So everything you can model and save, you can also place to the template.

What I was looking to do was create field templates for things like Gedmo Tree that create both the fields and the associations, and configure the entity gedmo properties in skipper for me. This would be a big time saver for me for things like created/updated fields that I create over and over again but still need configure in the entity properties.

If this is already possible any info you could provide would be amazing.

Thanks for the reply. Unfortunately, Gedmo has a very "bad" structure and it's not possible to do that. Because gedmo has most of the definitions included in the entity header and not in fields like Doctrine, there is very little we can do.

But I'm thinking if we can do more than field templates. Maybe some "extend entity" template, which should include entity properties as same as fields.

Another idea is to prepare some "entity templates" like field templates. Ability to choose new entity content from predefined templates. In such a case, you should have a common entity and then an entity with Gedmo Tree, etc.

What use case suits you better? Extension of existing entities, or creating new ones from pre-defined entities? Or do you have other idea how to do that?

I think what I'm asking for is basically some kind of macro capability. I can do everything I need to via a combination of field templates, and manual clicking/typing inside the editor. I'd like the ability to have a menu at the entity level that runs a script that I make that adds fields, configures entity properties, and possibly create associations. I'm assuming the main difficulty is in handling the associations, but limiting it to self associations would solve most of my use cases since it's primarily configuring extra doctrine extensions.

I also have the use case where I am repeating an association across multiple tables, and use the same structure across projects. Things like attaching a 'note' object to many different object types in the system, or referring to geographic regions (such as a country or US State). For cases like these simply being able to hard code the association name and getting an error if the entity didn't exist in the same namespace would be perfectly acceptable.

Thanks for sharing your idea. I have to discuss the macro thing with my colleagues, but right now I'm not sure we are able to do that in some easy way without creating some complete scripting and macro project.

But based on your description I think that instead of the macro we should be able to use these "in-entity" templates to achieve what you need. Such template would merge with the existing entity and maybe we would be able to proceed also associations (I'm not sure now).

So the template should contain some fields, some orm properties, some gedmo settings, etc. Also, such a template could contain also associations between "this" entity and another hard-coded ones, like you mentioned.

I have to discuss this with a colleague and we have to think about it. It's not a few-hours project but I believe it's not so complex.

What you are describing sounds like it would do pretty much exactly what I needed, thanks! Your product has been extremely valuable to me refactoring old projects and this would come in really handy.

Please log in or register to answer this question.