Version: current

# Class FileSubsites

Extension for the File object to add subsites support

  Extension
  DataObjectDecorator
  FileSubsites

Package: subsites
Located at subsites/code/FileSubsites.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` | # `Link( mixed $action = null )`
`public` | # `RelativeLink( mixed $action = null )`
`public` | # `URL( )`
`public` | # `alternateTreeTitle( )` Amends the CMS tree title for folders in the Files & Images section. Prefixes a '* ' to the folders that are accessible from all subsites. Amends the CMS tree title for folders in the Files & Images section. Prefixes a '* ' to the folders that are accessible from all subsites.
`public` | # `updateCMSFields( `FieldSet` & $fields )` Add subsites-specific fields to the folder editor. Add subsites-specific fields to the folder editor. #### Parameters $fields FieldSet $fields FieldSet with a contained TabSet #### Overrides `DataObjectDecorator::updateCMSFields`
`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` | # `onAfterUpload( )`
`public` | # `canEdit( )` #### Overrides `DataObjectDecorator::canEdit`
`public` | # `cacheKeyComponent( )` Return a piece of text to keep DataObject cache keys appropriately specific Return a piece of text to keep DataObject cache keys appropriately specific

### Methods inherited from DataObjectDecorator

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

### Methods inherited from Extension

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

### Magic methods summary

## Properties summary

`public static boolean` | $default_root_folders_global | #

### 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. -