We have projects in which many different "entity" types, such as "neighborhoods," "areas of interest," and "persons," may need to be associated with a given page or with each other. These entity types may also have a need for distinct columns. And of course we need a way to manage them all via the admin generator.

apostropheEntitiesPlugin provides a point of departure for this. Add the plugin to your project, then define Doctrine column aggregation subclasses of aEntity in your own schema.yml. The provided aEntityAdmin module automatically knows how to manage all of them, presenting a list of dashboards for them so you can switch among them.

Note that Doctrine form classes for models created via inheritance do not automatically offer just the relevant fields for that subclass. However you can fix that by overriding configure() in the form classes for the subclasses. The aEntityForm class gets the ball rolling by making sure the 'type' column cannot be edited directly. More importantly, aEntityForm provides distinct many-to-many widgets to associate each entity class with all other entity classes, including itself.



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4767 c89fab08-2f9b-42bf-8176-bd3ad6bee547
The entities plugin is up and running. Next I'll clean up PP and make sure the plugin is really sufficient after I purge the project level stuff



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4768 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Loose end relying on project level code



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4769 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Partials providing a "manage" global admin button and a way to display the association widgets in the page settings form. You also need to modify aPageSettingsForm, see the wiki page



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4771 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Slightly less hideous waste of whitespace



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4772 c89fab08-2f9b-42bf-8176-bd3ad6bee547
* PluginaEntityForm has a getUseFields method so that you can easily alter the fields in forms for subclasses - important since Doctrine inheritance doesn't do it automatically
* Whitespace



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4773 c89fab08-2f9b-42bf-8176-bd3ad6bee547
* Respect labels settings properly
* Rearranged options to be easier to extend



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4775 c89fab08-2f9b-42bf-8176-bd3ad6bee547
meet jobs: a separate thing



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4781 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Ahem, previous commit note should have been:

"extraDashboards partial makes it easy to add your own modules to the list of dashboards in the subnav"



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4782 c89fab08-2f9b-42bf-8176-bd3ad6bee547
changed up the admin subnav markup to fit the new apostrophe plugin admin theme styles


git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4794 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Added getSortedPosts, getSortedEvents and getSortedBlogItems convenience methods to the aEntity class. These fetch related posts or events in their natural order. Only published items are returned. For events, only events that have not already ended are returned. These methods support limit and offset options for easy AJAX pagination.



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4795 c89fab08-2f9b-42bf-8176-bd3ad6bee547
aEntityTable::findAllSorted() now has a friend, aEntityTable::findAllSortedArray(). They both call aEntityTable::findAllSortedBody() which takes an array of options for extensibility



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4812 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Clarified that our sample manage button isn't really ready to use, your own version will specify a different default subclass to suit your project



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4814 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Cleaner way to build queries



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4815 c89fab08-2f9b-42bf-8176-bd3ad6bee547
* Blog posts and articles can now be filtered by each type of entity. For instance, you can filter events by person or organization or project (if your project has those subclasses of aEntity). You must add the aEntityBlog module to your settings.yml file's enabled_modules list to take advantage of this.

* PHP 5.3.x is now a minimum requirement for this new and relatively bleeding edge plugin.

* aEntityTable now implements a comparator() function which determines the sort order of two associative arrays representing entities. The table class of each subclass of aEntity that requires a custom sort order must override both `addOrderBy` and `comparator`. The first does it via DQL, the latter does it in PHP land. The latter is useful (and necessary to the blog filters) when we have already retrieved a mixed collection of entities via array hydration.



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4821 c89fab08-2f9b-42bf-8176-bd3ad6bee547
$neighborhood->getEntities('Organization') gets all entities related to $neighborhood that are members of the Organization subclass



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheEntitiesPlugin/trunk@4823 c89fab08-2f9b-42bf-8176-bd3ad6bee547