NEW Allow decoration of DMSDocument->Pages()

This commit is contained in:
Ingo Schommer 2012-08-31 01:09:43 +02:00
parent 9f6c1c8d19
commit a57f887bb2
1 changed files with 7 additions and 1 deletions

View File

@ -71,12 +71,18 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
$this->Pages()->remove($pageObject);
}
function Pages() {
$pages = $this->getManyManyComponents('Pages');
$this->extend('updatePages', $pages);
return $pages;
}
/**
* Returns a list of the Page objects associated with this Document
* @return DataList
*/
function getPages() {
$this->Pages();
return $this->Pages();
}
/**