This project is not covered by Drupal’s security advisory policy.
This module was developed when drush gen content-entity did not exist yet.
consider it deprecated.
the development branch, was supposed to remove dependency on entityspice itself.
_________________________________________________
Entity Spice is an Entity API extension. It assumes a lot of defaults, And handles the repeated tasks and boilerplate code needed to create an entity type. Later you can gradually override and customize any aspect of the result to your needs.
But why another entity type module?
Entity Spice itself is a completely unobtrusive API and wont stand in your way at all, you can ignore any part of it which does not suit your needs and roll your own implementation. It's also a code generator so in the end you will have a complete module with an entity type defined in it. Modifying the final result will be easy as a peace of cake. No part of Entity Spice will call your code except one info hook, it's your module (and thus entity type) who decides ES should handle an aspect of your module or not.
Oven
There is a bonus module also, called Oven, which cooks entity types for you. For now it only has a Drush interface. After you cooked your entity type you can uninstall and remove Oven completely. It's not bugless but you will not need it in production site. After cooking your entity you can uninstall it.
The Road Map
- Adding custom property/pseudo fields to entity type before cooking it: say you wanted a column in entity table called number of views...
- Add an awesome access API.
- Improve documentations.
work in progress.
The access API is not implemented yet. The access API is implemented but it's very basic. You can override it with your own of course.
Related/Similar modules
multifield: a field construction module. It could be useful.
ECK: entity construction kit
Quick how to
- Download and enable entityspice with Drush (it only works with Drush.
- Use this command to generate an entity type:
drush cook my_awesome_entity
If the command was not found trydrush cc drush - It will ask you for some parameters, It's better to use defaults for now and customize them later as some of them are deprecated.
- A module named my_awesome_entity will be put in sites/all/modules directory, If you have a contrib directory too you have to move my_awesome_entity from contrib to custom yourself (will be fixed).
- Enable your module: drush en my_awesome_entity (not necessarily with drush, can be done from admin page).
- Use it! check the permissions page for adjusting proper permissions. If you have not customized the paths, they are as following:
- /devel/entityspice_info/ ----> Various information about entity types of EntitySpice.
- /es/ ---->List of all entity types created using EntitySpice.
- /es/my_awesome_entity similar to /admin/content
- /es/my_awesome_entity/add ----> /node/add
- /es/my_awesome_entity/add/BUNDLE ----> /node/add/TYPE
- /es/my_awesome_entity/% ----> /node/%
- /es/my_awesome_entity/%/edit ----> /node/%/edit
- /es/admin/structure/my_awesome_entity ----> /admin/structure/types
- You can now move the generated module to your production site
* A module/entity type is considered EntitySpice dependent meanwhile it implements the hook_entityspice_info(). If a day comes you wanted to get rid of EntitySpice in your module you can remove this hook, And EntitySpice will forget about you.
Projects with similar functionality
- ECK (Entity Construction Kit): It generates fieldable entity types too, difference: generated types are handled by ECK are not an stand-alone module.
- Model: An starting point for developing modules, very similar to EntitySpice. However using EntitySpice, you have more chance of easy customizing and less coding.
Please note: Oven (which is to be used with drush) has issues on windows and windows paths. I'll try to fix it soon but help from anyone who has access to windows is appreciated.
Project information
Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projectsObsolete
Use of this project is deprecated.- Project categories: Content editing experience, Developer tools
- Created by hkoosha on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
