Class Folder
Represents a folder in the assets/ directory.
- Object
-
ViewableData
implements
IteratorAggregate
-
DataObject
implements
DataObjectInterface,
i18nEntityProvider
-
File
-
Folder
Methods summary
public static
|
|
public
|
|
public
|
#
constructChild( mixed $name )
Construct a child of this Folder with the given name. It does this without actually using the object model, as this starts messing with all the data. Rather, it does a direct database insert. |
public
|
#
addUploadToFolder( mixed $tmpFile )
Take a file uploaded via a POST form, and save it inside this folder. |
public
A
|
|
public
String
|
|
public
|
#
onBeforeDelete( )
Event handler called before deleting from the database. You can overload this to clean up or otherwise process data before delete this record. Don't forget to call parent::onBeforeDelete(), though! |
public
|
#
deleteDatabaseOnly( )
Delete the database record (recursively for folders) without touching the filesystem |
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
#
resetFilename( mixed $renamePhysicalFile = true )
Overload resetFilename() to call resetFilename() on all the children, too. Pass renamePhysicalFile = false, since the folder renaming will have taken care of this |
public
|
#
cmsCleanup_parentChanged( )
This isn't a decendant of SiteTree, but needs this in case the group is "reorganised"; |
public
|
#
getCMSFields( )
Return the FieldSet used to edit this folder in the CMS. You can modify this
fieldset by subclassing folder, or by creating a |
public
|
#
getUnusedFilesListFilter( )
Looks for files used in system and create where clause which contains all ID's of files. |
public
|
#
getUploadIframe( )
Display the upload form. Returns an iframe tag that will show admin/assets/uploadiframe. |
public
|
Methods inherited from File
BackLinkTrackingCount(),
CMSThumbnail(),
DeleteLink(),
Icon(),
Link(),
RelativeLink(),
TreeTitle(),
appCategory(),
canCreate(),
canDelete(),
canEdit(),
canView(),
collateDescendants(),
fieldLabels(),
find(),
flushCache(),
format_size(),
getAbsoluteSize(),
getAbsoluteURL(),
getExtension(),
getFileType(),
getFilename(),
getFullPath(),
getLinkedURL(),
getSize(),
getURL(),
getUsageCount(),
get_file_extension(),
instance_get(),
onAfterDelete(),
onAfterUpload(),
onBeforeWrite(),
setField(),
setFilename(),
setName(),
setParentID(),
updateLinks(),
uploadMetadataFields()
Methods inherited from DataObject
Aggregate(),
RelationshipAggregate(),
__construct(),
baseTable(),
belongs_to(),
buildDataObjectSet(),
buildSQL(),
can(),
castedUpdate(),
composite_fields(),
context_obj(),
customDatabaseFields(),
custom_database_fields(),
data(),
databaseFields(),
databaseIndexes(),
database_extensions(),
database_fields(),
db(),
dbObject(),
debug(),
defaultSearchFilters(),
defineMethods(),
delete(),
delete_by_id(),
destroy(),
disableCMSFieldsExtensions(),
disable_subclass_access(),
duplicate(),
enableCMSFieldsExtensions(),
enable_subclass_access(),
exists(),
extendedSQL(),
fieldLabel(),
flush_and_destroy_cache(),
forceChange(),
get(),
getAllFields(),
getCMSActions(),
getChangedFields(),
getClassAncestry(),
getComponent(),
getComponents(),
getComponentsQuery(),
getDefaultSearchContext(),
getField(),
getFrontEndFields(),
getManyManyComponents(),
getManyManyComponentsQuery(),
getManyManyFilter(),
getManyManyJoin(),
getRemoteJoinField(),
getReverseAssociation(),
getTitle(),
get_by_id(),
get_one(),
get_validation_enabled(),
hasDatabaseField(),
hasField(),
hasOwnTableDatabaseField(),
hasValue(),
has_many(),
has_one(),
has_own_table(),
i18n_plural_name(),
i18n_singular_name(),
inheritedDatabaseFields(),
instance_get_one(),
isChanged(),
isEmpty(),
isInDB(),
is_composite_field(),
many_many(),
many_many_extraFields(),
merge(),
newClassInstance(),
onAfterWrite(),
plural_name(),
populateDefaults(),
provideI18nEntities(),
relObject(),
requireDefaultRecords(),
requireTable(),
reset(),
scaffoldFormFields(),
scaffoldSearchFields(),
searchableFields(),
setCastedField(),
setClassName(),
setComponent(),
set_context_obj(),
set_validation_enabled(),
singular_name(),
summaryFields(),
toMap(),
update(),
write(),
writeComponents(),
writeWithoutVersion()
Methods inherited from ViewableData
ATT_val(),
BaseHref(),
CSSClasses(),
ColumnBreak(),
ColumnCalc(),
ColumnNumber(),
ColumnPad(),
ColumnPos(),
CurrentMember(),
CurrentPage(),
Debug(),
Even(),
EvenOdd(),
First(),
FirstLast(),
HasPerm(),
IsAjax(),
JS_val(),
Last(),
Me(),
Middle(),
MiddleString(),
Modulus(),
MultipleOf(),
Odd(),
Pos(),
RAW_val(),
SQL_val(),
ThemeDir(),
ThemeName(),
Top(),
TotalItems(),
XML_val(),
__get(),
__isset(),
__set(),
buildCastingCache(),
cachedCall(),
castingClass(),
castingHelper(),
castingHelperPair(),
castingObjectCreator(),
castingObjectCreatorPair(),
customise(),
escapeTypeForField(),
getIterator(),
getSecurityID(),
getXMLValues(),
i18nLocale(),
iteratorProperties(),
obj(),
renderWith(),
setCustomisedObj()
Methods inherited from Object
__call(),
__toString(),
__wakeup(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
cacheToFileWithArgs(),
clearCache(),
combined_static(),
create(),
createMethod(),
create_from_string(),
extInstance(),
extend(),
getCustomClass(),
getExtensionInstance(),
getExtensionInstances(),
get_extensions(),
get_static(),
hasExtension(),
hasMethod(),
has_extension(),
invokeWithExtensions(),
is_a(),
loadCache(),
parentClass(),
parse_class_spec(),
remove_extension(),
sanitiseCachename(),
saveCache(),
set_stat(),
set_static(),
set_uninherited(),
stat(),
strong_create(),
uninherited(),
uninherited_static(),
useCustomClass()
Magic methods summary
Properties summary
public static
string
|
$default_sort |
#
The default sort expression. This will be inserted in the ORDER BY clause of a SQL query if no other sort expression is provided. |
Properties inherited from File
$allowed_extensions,
$apply_restrictions_to_admin,
$belongs_many_many,
$cache_file_fields,
$db,
$defaults,
$extensions,
$has_many,
$has_one,
$indexes,
$many_many,
$plural_name,
$singular_name
Properties inherited from DataObject
$allowed_actions,
$ancestry,
$api_access,
$belongs_to,
$brokenOnDelete,
$brokenOnWrite,
$cache_get_one,
$cache_has_own_table,
$cache_has_own_table_field,
$casting,
$componentCache,
$components,
$create_table_options,
$default_records,
$destroyed,
$field_labels,
$many_many_extraFields,
$original,
$record,
$searchable_fields,
$summary_fields
Properties inherited from ViewableData
$customisedObject,
$default_cast,
$failover,
$iteratorPos,
$iteratorTotalItems