\SubsiteDataObjectMany
Extension for a dataobject belonging to multiple subsites
Don't forget to add $belongs_many_many on the subsite as well through an extension
Synopsis
class SubsiteDataObjectMany
extends DataExtension
{
- // members
- private static $_accessible_sites_map_cache = NULL;
- private static array $db = ;
- private static array $many_many = ;
- // methods
- public static void add_to_class()
- public void isMainDataObject()
- public void listSubsiteIDs()
- public void canView()
- public void augmentSQL()
- public void buildSubsiteList()
- public void onBeforeWrite()
- public void onAfterWrite()
- public void updateCMSFields()
- public void alternateSiteConfig()
- public boolean canEdit()
- public boolean canDelete()
- public static array extendedClasses()
- public void alternateAbsoluteLink()
- public void cacheKeyComponent()
- public boolean|null canCreate()
Hierarchy
Extends
- DataExtension
Members
private
- $_accessible_sites_map_cache
- $db
- $many_many
Methods
public
- add_to_class()
- alternateAbsoluteLink()
- alternateSiteConfig()
- augmentSQL() — Update any requests to limit the results to the current site
- buildSubsiteList()
- cacheKeyComponent() — Return a piece of text to keep DataObject cache keys appropriately specific
- canCreate()
- canDelete()
- canEdit() — Only allow editing of a page if the member satisfies one of the following conditions: - Is in a group which has access to the subsite this page belongs to - Is in a group with edit permissions on the "main site"
- canView()
- extendedClasses() — Gets all classes with this extension
- isMainDataObject()
- listSubsiteIDs()
- onAfterWrite()
- onBeforeWrite()
- updateCMSFields()