\MultisitesModelAdminExtension
MultisitesModelAdminExtension
Synopsis
class MultisitesModelAdminExtension
extends Extension
{
- // members
- private static array $allowed_actions = ;
- private DataObject $listDataClass;
- // methods
- public void onAfterInit()
- public void updateList()
- public void updateEditForm()
- public void updateSearchForm()
- public Site getActiveSite()
- public void setActiveSite()
- public string getActiveSiteSessionKey()
- private DataObject getListDataClass()
- private boolean modelIsMultiSitesAware()
Hierarchy
Extends
- Extension
Members
private
- $allowed_actions
- $listDataClass
—
DataObject
Cached instance of the data class currently being listed
Methods
private
- getListDataClass() — Get and cache an instance of the data class currently being listed
- modelIsMultiSitesAware() — Determines whether the current model being managed is MultiSitesAware
public
- getActiveSite() — get the active site for this model admin
- getActiveSiteSessionKey() — Get the key used to store this model admin active site Session to
- onAfterInit() — If this dataClass is MultisitesAware, set the Multisites_ActiveSite session variable to one of the follwing: a) The SiteID passed in the request params, if it exists b) The current site, if the current member is a manager of that site c) The first site that the current member is a manager of
- setActiveSite() — Set the active site for this model admin
- updateEditForm() — If the current member is not a "Manager" of any sites, they shouldn't be able to manage MultisitesAware DataObjects.
- updateList() — If this dataClass is MultisitesAware, filter the list by the current Multisites_ActiveSite
- updateSearchForm() — Provide a Site filter