Cover by Sammy Spets

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Converting the recipe content type to use fields

Our conversion of the recipe module to use fully-fledged entities can continue now, and we will convert all of the database fields in the recipe table to entity fields. Converting the structure is only a part of the task. There are many code changes necessary to ensure that all supporting code correctly manipulates the new structure. The steps we will take to upgrade the module code are as follows:

  1. Create the fields using the UI.
  2. Export them to code inside a feature.
  3. Put the exported declarations into recipe module and convert field name prefixes to recipe_.
  4. Tweak the recipe module code so that the old fields don't clobber the new ones in the field admin UI, and add link, number, text, and token modules ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required