Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AbstractAdminListConfigurator.php #96

Conversation

tentwofour
Copy link
Contributor

Added regex to make nicer Admin List add button labels based on entity's name.

The current label for adminlist buttons isn't visually appealing - it simply takes the entities name, and lowercases it.

This PR takes the entity's name, and does some regex-fu to convert it to a nice, human string.

ie. MyGreatWonderfulEntity => "Add new My Great Wonderful Entity"

Tested, and should work for (most) any entity naming conventions, ie:

EntityName => "Add new Entity Name"
ENTITYName => "Add new ENTITY Name"
EntityNAMEAgain => "Add new Entity NAME Again"
entityname => "Add new entityname"

Added regex to make nicer Admin List add button labels based on entity's name.

The current label for adminlist buttons isn't visually appealing - it simply takes the entities name, and lowercases it.

This PR takes the entity's name, and does some regex-fu to convert it to a nice, human string.

ie. MyGreatWonderfulEntity => "Add new My Great Wonderful Entity"

Tested, and should work for (most) any entity naming conventions, ie:

EntityName => "Add new Entity Name"
ENTITYName => "Add new ENTITY Name"
EntityNAMEAgain => "Add new Entity NAME Again"
entityname => "Add new entityname"
roderik pushed a commit that referenced this pull request Jan 1, 2015
…figurator_superfriendlyname

Update AbstractAdminListConfigurator.php
@roderik roderik merged commit 4043452 into Kunstmaan:master Jan 1, 2015
@roderik
Copy link
Contributor

roderik commented Jan 1, 2015

Thx

@roderik roderik added this to the Q1 2015 - v3.1 milestone Jan 1, 2015
@tentwofour tentwofour deleted the tentwofourfeature_adminlistconfigurator_superfriendlyname branch January 4, 2015 20:35
@roderik roderik modified the milestones: 3.1.0, 3.4.0, 3.0.1 Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants