Cover by Sammy Spets

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Administration interface and exportability

All of the previous code forces us to use programmatic ways to manage bundles and fields of our entity type. We want administrative users to be able to manage bundles and fields through the web interface. In addition to this, we would like to allow users to export and import bundle configurations. To do so we need the following things:

  • A way to store information about the bundles created by the user
  • Expose that information to Drupal as entities with some extra directives
  • Provide access handling in order to prevent unauthorized users from changing our bundles

Storing bundle information

To store the bundle information, we will use a new database table called recipe_ingredient_type. Add the following table declaration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required