Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

If asked about the quintessential element in Drupal, my immediate response would be the "Entity". It's the heartbeat of Drupal, its foundational concept.

Out of the box, Drupal offers essential entity types like node, taxonomy, user, block, comment, media, and more. Additionally, contribution modules expand the list with entities such as Commerce Product, Store, Order, Variation, Paragraph, and Component builder item.

However, despite their prevalence, coding a new Custom Entity often poses a challenge for many, whether they're beginners or experienced Drupal developers. The web overflows with guides on the topic, but successfully crafting a complete entity remains elusive for most.

Wouldn't it be wonderful if there was a function to craft a new entity effortlessly? This module now can help to generate a Drupal Custom Entity in just 3 minutes. The resulting entity adheres to standards, allowing any developer to extend its functionality.

Features

  • This module is a prototype of a standard custom entity that integrates seamlessly with admin content, type management, multilingual capabilities, and view contextual filters and so on.
  • This module provide a drush command for automated content generation using copy-replacement (detail in README.txt).
  • This module provide a user interface to automate new entity creation through copy-replacement (detail in README.txt).

How to use

There're 2 way to generate (clone) a new entity from this module

Approach 1: UI, visit website at the url:

  • admin/content/custom-entity-example-types/clone-form
  • make sure the folder location is writable
  • input your module in the destination fields
  • Click on Generate

Approach 2: Drush, you can use drush command line like some sample bellow:

drush cee-ge 'custom_entity_example' 'we_company' 'custom-entity-example' 'company' 'custom_entity_template_example' 'company' 'CustomEntityExample' 'WeCompany' 'custom entity example' 'company' 'Custom Entity Example' 'Company'

drush cee-ge 'custom_entity_example' 'we_contact' 'custom-entity-example' 'contact' 'custom_entity_template_example' 'contact' 'CustomEntityExample' 'WeContact' 'custom entity example' 'contact' 'Custom Entity Example' 'Contact'

drush cee-ge 'custom_entity_example' 'we_message' 'custom-entity-example' 'message' 'custom_entity_template_example' 'message' 'CustomEntityExample' 'WeMessage' 'custom entity example' 'message' 'Custom Entity Example' 'Message'

drush cee-ge 'custom_entity_example' 'we_follow' 'custom-entity-example' 'follow' 'custom_entity_template_example' 'follow' 'CustomEntityExample' 'WeFollow' 'custom entity example' 'follow' 'Custom Entity Example' 'Follow'

drush cee-ge 'custom_entity_example' 'we_connect' 'custom-entity-example' 'connect' 'custom_entity_template_example' 'connect' 'CustomEntityExample' 'WeConnect' 'custom entity example' 'connect' 'Custom Entity Example' 'Connect'

drush cee-ge 'custom_entity_example' 'we_connect_request' 'custom-entity-example' 'connect-request' 'custom_entity_template_example' 'connect_request' 'CustomEntityExample' 'WeConnectRequest' 'custom entity example' 'connect request' 'Custom Entity Example' 'Connect Request'

drush cee-ge 'custom_entity_example' 'we_contribution' 'custom-entity-example' 'contribution' 'custom_entity_template_example' 'contribution' 'CustomEntityExample' 'WeContribution' 'custom entity example' 'contribution' 'Custom Entity Example' 'Contribution'

drush cee-ge 'custom_entity_example' 'we_activity' 'custom-entity-example' 'activity' 'custom_entity_template_example' 'activity' 'CustomEntityExample' 'WeActivity' 'custom entity example' 'activity' 'Custom Entity Example' 'Activity'

drush cee-ge 'custom_entity_example' 'we_notification' 'custom-entity-example' 'notification' 'custom_entity_template_example' 'notification' 'CustomEntityExample' 'WeNotification' 'custom entity example' 'notification' 'Custom Entity Example' 'Notification'

drush cee-ge 'custom_entity_example' 'we_settings' 'custom-entity-example' 'settings' 'custom_entity_template_example' 'settings' 'CustomEntityExample' 'WeSettings' 'custom entity example' 'settings' 'Custom Entity Example' 'Settings'

drush cee-ge 'custom_entity_example' 'we_group' 'custom-entity-example' 'group' 'custom_entity_template_example' 'group' 'CustomEntityExample' 'WeGroup' 'custom entity example' 'group' 'Custom Entity Example' 'Group'


For both approaches, you will have your new module including the entity with essential functions to use for your projects.

  • You can see your manage entity content in /admin/content
  • You can see your manage entity structure in /admin/structure

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Aug 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.1 Stable Nov 8, 2023
1.0.0 Stable Sep 20, 2023
1.0.x-dev Dev Aug 22, 2023