SaaS CMS has officially launched! Learn more now.

Override entity type without custom entity provider?


I want to replace the Entry instances with a derived class which changes the behaviour slightly. There's no custom data or anything. I could only find the old docs, like Section 3.1 in that doc describes how to replace an entity with a derived type by using a custom entity provider

I'm thinking that this plug-in system might have evolved since 3.1 or maybe there was a simpler way even back then? I really only want to intercept the creating of the Entry entity type and use my custom class. Is using a custom entity provider the only way?

Apr 24, 2012 8:28

Do you need to intercept creation of the entity or just mixin some additional functionality to that entity?

What I did was to wrap that entity into my own interception class and provide strongly typed access to entity's attributes. Maybe that could help you to accomplish your requirements in similar way?

May 16, 2012 8:02

Thanks for your suggestion! I needed to override one of the methods in the entity, so any approach involving extension methods would not work. I did it the custom entity provider way and it worked, just thought there might be a simpler way. 

May 16, 2012 10:18
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.