mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Added 'updateCMSFields' hook to File (fixes #7091)
This commit is contained in:
parent
6c91aa0ec5
commit
7c1b40d4a7
@ -316,7 +316,10 @@ class File extends DataObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the fields to power the edit screen of files in the CMS
|
||||
* Returns the fields to power the edit screen of files in the CMS.
|
||||
* You can modify this FieldList by subclassing folder, or by creating a {@link DataExtension}
|
||||
* and implemeting updateCMSFields(FieldList $fields) on that extension.
|
||||
*
|
||||
* @return FieldList
|
||||
*/
|
||||
function getCMSFields($params = null) {
|
||||
@ -383,6 +386,9 @@ class File extends DataObject {
|
||||
)
|
||||
);
|
||||
|
||||
// Folder has its own updateCMSFields hook
|
||||
if(!($this instanceof Folder)) $this->extend('updateCMSFields', $fields);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user