Implement getFilename and getName to stick comparely to File API.

This commit is contained in:
Will Rossiter 2013-12-07 12:54:46 +13:00
parent ae9a12ed61
commit 50aa550161
1 changed files with 12 additions and 0 deletions

View File

@ -430,6 +430,18 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
}
}
function getFileName() {
if($this->getField('Filename')) {
return $this->getField('Filename');
} else {
return ASSETS_DIR . '/';
}
}
function getName() {
return $this->getField('Title');
}
/**
* Deletes the DMSDocument, its underlying file, as well as any tags related to this DMSDocument. Also calls the
* parent DataObject's delete method.