Quantcast
Viewing all articles
Browse latest Browse all 291783

Move field types to classes / Plugins

Now that #1735118: Change notice: Convert Field API to CMI landed, let's revive this.

For the record, the current "field type API" consists of :
hook_field_info()
hook_field_schema()
hook_field_is_empty()
hook_field_load() (acts on multiple entities)
hook_field_validate()
hook_field_presave()
hook_field_insert()
hook_field_update()
hook_field_delete()
hook_field_delete_revision()
hook_field_prepare_view() (acts on multiple entities)
hook_field_prepare_translation() (probably on its way out, but still called in current HEAD)

As explained in #1949932-1: [META] Unify entity fields and field API, the final plan is to somehow merge the "field type handler" plugin classes (holding the methods that correspond to the current "field type" hooks) with EntityNG's field / field item classes, to limit the # of classes you need to provide to define a new field type. It's not yet fully clear if / how this can be attained, though.

For now, I'll just reroll / tidy up the initial code I started several months ago, and that was postponed while focusing on widgets, formatters, and CMI. This includes:
- a new 'field type handler' plugin type
- conversion of text field types
- a Legacy plugin keeps "old style" field types working.

Stay tuned.


Viewing all articles
Browse latest Browse all 291783

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>