remove DMSSiteTreeExtension.getDocumentSets() because it messes with the page history (readonly mode)

This commit is contained in:
Florian Thoma 2018-03-01 12:15:44 +11:00
parent fb6bdf59c2
commit 2c204bb0b6
2 changed files with 2 additions and 12 deletions

View File

@ -151,7 +151,7 @@ class DMS extends Object implements DMSInterface
public function getDocumentSetsByPage(SiteTree $page)
{
return $page->getDocumentSets();
return $page->DocumentSets();
}
/**

View File

@ -52,16 +52,6 @@ class DMSSiteTreeExtension extends DataExtension
));
}
/**
* Get a list of document sets for the owner page
*
* @return ArrayList
*/
public function getDocumentSets()
{
return $this->owner->DocumentSets();
}
/**
* Get a list of all documents from all document sets for the owner page
*
@ -71,7 +61,7 @@ class DMSSiteTreeExtension extends DataExtension
{
$documents = ArrayList::create();
foreach ($this->getDocumentSets() as $documentSet) {
foreach ($this->owner->DocumentSets() as $documentSet) {
/** @var DocumentSet $documentSet */
$documents->merge($documentSet->getDocuments());
}