mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
2.9 KiB
2.9 KiB
2.0.0 (unreleased)
Document sets
Documents now belong to "sets", which are attached to Pages. A Page can have many Document Sets, and a Set has a many_many relationship with Documents.
When upgrading from 1.x to 2.x you will need to migrate the relationships from your Pages to Documents to support having a Document Set intermediary. See here for an example build task to help with this process.
API changes
DMSSiteTreeExtension::no_documents_tab
removed, use YAML configurationMyPage.documents_enabled: false
insteadDMSSiteTreeExtension::show_documents_tab
removed, use YAML configurationMyPage.documents_enabled: true
insteadDMSSiteTreeExtension::PageDocuments
removed, useDMSSiteTreeExtension::getDocumentSets
insteadDMSSiteTreeExtension::getDocuments
removed, useDMSSiteTreeExtension::getAllDocuments
insteadDMSDocument::addPage
removed, use document sets insteadDMSDocument::addPages
removed, use document sets insteadDMSDocument::removePage
removed, use document sets insteadDMSDocument::removeAllPages
removed, use document sets insteadDMSDocument::getPages
removed, useDMSDocument::getRelatedPages
insteadDMSDocumentInterface
has had the page manipulation methods removed, as aboveDMSDocumentAddController::add_allowed_extensions
removed, use YAML configurationDMSDocumentAddController::allowed_extensions
insteadDMSInterface
(andDMS
) are stricter in thegetByPage
method, enforcing aSiteTree
type hint- New method
DMSInterface::getDocumentSetsByPage
(and inDMS
) DMS::$dmsFolder
removed, use YAML configurationDMS.folder_name
insteadDMS::$dmsFolderSize
removed, use YAML configurationDMS.folder_size
insteadDMS::get_dms_path
made non-static, useDMS::inst()->getStoragePath()
insteadDMS::transform_file_to_file_path
made non-static, useDMS::inst()->transformFileToFilePath()
insteadDMS::create_storage_folder
made non-static, useDMS::inst()->createStorageFolder()
insteadDMS::get_storage_folder
made non-static, useDMS::inst()->getStorageFolder()
insteadDMSDocument::addTag
,::getTagsList
,::removeTag
and::removeAllTags
removed from theDMSDocument
andDMSDocumentInterface
. Please use the ORM relationship created by applying theDMSDocumentTaxonomyExtension
extension toDMSDocument
instead.DMSInterface::getByTag
removed fromDMSInterface
andDMS
. Use ORM relationships from applyingDMSDocumentTaxonomyExtension
toDMSDocument
instead.DMSGridFieldDeleteAction
removed
Template changes
The default template entry point is now DocumentSets.ss
(previously Documents.ss
). As well as this change,
Documents.ss
has been renamed to DocumentSet.ss
.
Frontend assets
We've removed the configuration for using Compass to build SCSS. You can now use Webpack instead. See here for more information on this.