Version: current

# Class GroupSubsites

Extension for the Group object to add subsites support

  Extension
  DataObjectDecorator
  GroupSubsites implements PermissionProvider

Package: subsites
Located at subsites/code/GroupSubsites.php

## Methods summary

`public array` | # `extraStatics( )` Define extra database fields Define extra database fields Return a map where the keys are db, has_one, etc, and the values are additional fields/relations to be defined. #### Returns `array` Returns a map where the keys are db, has_one, etc, and the values are additional fields/relations to be defined. #### Overrides `DataObjectDecorator::extraStatics`
`public` | # `requireDefaultRecords( )` Migrations for GroupSubsites data. Migrations for GroupSubsites data. #### Overrides `DataObjectDecorator::requireDefaultRecords`
`public` | # `updateCMSFields( `FieldSet` & $fields )` This function is used to provide modifications to the form in the CMS by the decorator. By default, no changes are made. DataObject->getCMSFields(). This function is used to provide modifications to the form in the CMS by the decorator. By default, no changes are made. DataObject->getCMSFields(). Please consider using updateFormFields() to globally add formfields to the record. The method `GroupSubsites::updateCMSFields()` should just be used to add or modify tabs, or fields which are specific to the CMS-context. Caution: Use FieldSet->addFieldToTab() to add fields. #### Parameters $fields FieldSet $fields FieldSet with a contained TabSet #### Overrides `DataObjectDecorator::updateCMSFields`
`public` | # `alternateTreeTitle( )` If this group belongs to a subsite, append the subsites title to the group title to make it easy to distinguish in the tree-view of the security admin interface. If this group belongs to a subsite, append the subsites title to the group title to make it easy to distinguish in the tree-view of the security admin interface.
`public` | # `augmentSQL( `SQLQuery` & $query )` Update any requests to limit the results to the current site Update any requests to limit the results to the current site #### Parameters $query SQLQuery $query Query to augment. #### Overrides `DataObjectDecorator::augmentSQL`
`public` | # `onBeforeWrite( )` #### Overrides `DataObjectDecorator::onBeforeWrite`
`public` | # `onAfterWrite( )` #### Overrides `DataObjectDecorator::onAfterWrite`
`public` | # `alternateCanEdit( )`
`public` | # `providePermissions( )` Return a map of permission codes to add to the dropdown shown in the Security section of the CMS. array( 'VIEW_SITE' => 'View the site', ); Return a map of permission codes to add to the dropdown shown in the Security section of the CMS. array( 'VIEW_SITE' => 'View the site', ); #### Implementation of `PermissionProvider::providePermissions()`

### Methods inherited from DataObjectDecorator

`augmentDatabase()`, `augmentWrite()`, `can()`, `canCreate()`, `canDelete()`, `canEdit()`, `flushCache()`, `load_extra_statics()`, `onAfterDelete()`, `onBeforeDelete()`, `populateDefaults()`, `updateCMSActions()`, `updateFieldLabels()`, `updateFrontEndFields()`, `updateSummaryFields()`

### Methods inherited from Extension

`__construct()`, `clearOwner()`, `getOwner()`, `get_classname_without_arguments()`, `setOwner()`

### Magic methods summary

## Properties summary

### Properties inherited from DataObjectDecorator

`$decoratable_statics`

### Properties inherited from Extension

`$allowed_actions`, `$class`, `$owner`, `$ownerBaseClass`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -