Hi,

The module uses the same name for the module and the entity. It's a common way to do, but it is not always a good idea and can be confusing. For example, if I want to create an entity 'term' or 'vocabulary' for the module 'taxonomy', I can't make a simple search and replace on the model module.

That's why I made the below patch, where the module name remains "model", but the entity name is changed to "modelentity".

If the user wants to use the same name, he can simply rename "model" and "modelentity" with the same name. If he prefers to use two different names, he can too.

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

CommentFileSizeAuthor
#1 model-Separate-names-1458850-1.patch86.45 KBDaniel_KM
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Daniel_KM’s picture

Here is the patch.

The readme.txt has been updated.

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Paul Rowell’s picture

Hi Daniel,

Thanks for the patch, however it breaks the entity views page. The view and operations appear as broken handlers.
Applied patch using Netbeans 7.0.1

aangel’s picture

After applying the patch, change the names of the following files:

modelentity_handler_model_operations_field.inc --> modelentity_handler_modelentity_operations_field.inc
model_handler_delete_link_field.inc --> modelentity_handler_delete_link_field.inc
model_handler_edit_link_field.inc --> modelentity_handler_edit_link_field.inc

Flush the cache and the View, Edit and Delete links will appear.

rtackett’s picture

+1 for this suggestion

Anybody’s picture

Issue summary: View changes

+1 for the suggestion. Can we get this RTBC and document it?