We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Future of EE_Fieldtype class

Developer Preview

Low's avatar
Low
407 posts
10 years ago
Low's avatar Low

So, at the moment, all fieldtypes extend the EE_Fieldtype, which is in the legacy folder. I presume that means it will be phased out at some point. What can we expect in its stead?

       
Pascal Kriete's avatar
Pascal Kriete
2,589 posts
10 years ago
Pascal Kriete's avatar Pascal Kriete

I don’t have a concrete answer, but a very likely answer is: nothing.

Some of that default behavior does not need to live in a parent class, it can be handled elsewhere. Other things, like install and uninstall, should not be per add-on component at all. It’s an early-v2 relic, in v3 you install the whole add-on as one, and the code should reflect that. Other carry-overs include things like everything still declaring its own versions. The addon.setup file has a single version that should be used everywhere.

For fieldtypes specifically, I would like to see them encapsulate and expose their own data better. The current functional programming inspired approach works well for data stored on the channel data table, but it’s a little finicky when dealing with data in your own tables. For example, you can’t really access grid or relationship data through the ChannelEntry model; all you can get is rendered data.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.