Kunstmaan/KunstmaanBundlesCMS — pull request #96 by tentwofour (2014-12-31 16:00:42+00:00)
Title: Update AbstractAdminListConfigurator.php

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"