Add human readable name#759
Add human readable name#759jmolivas merged 4 commits intohechoendrupal:masterfrom Sutharsan:issue-743-human-readable-name
Conversation
* upstream/master: Sync guzzle ver with core Fix comment style. Set default widget and formatter. Add command generate:plugin:field Fixes after testing. Add console strings. Add generator commands. Add plugin generators. Add field plugin templates. Code style. Add service definition for plugin manager. Add generator for custom plugin type with annotation discovery.
Add StringUtils::camelCaseToHuman. Add label to entities.
|
Thanks for the PR @Sutharsan |
|
This now looks a bit weird in the permissions department. If I create a "Book" entity type the permission titles now read:
Because this is singular this is confusing. Which book am I allowed to edit? What if I want to give a role the permission to edit all books? It would be better if we follow the pattern used for all permissions in core: display the plural form. Since we do not know how our entity is spelled in plural we can simply add the word "entities":
In the future it might be interesting to ask the user for the plural form when generating entities, we might be able to use it elsewhere too. But for now this would do the trick. When we are touching this it would also be good to fix the spelling errors (e.g. "adminster") and remove the descriptions, since they are not adding any additional information and have bad grammar. I'll open a new PR for this. |
This PR adds a human readable name (--label) to content entity and config entity generators.
Adds a human readable formatter
StringUtils::camelCaseToHuman.Applies the HR label format to plugins.
Affected commands: