mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 12:05:56 +00:00
Implement getFilename and getName to stick comparely to File API.
This commit is contained in:
parent
ae9a12ed61
commit
50aa550161
@ -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
|
* Deletes the DMSDocument, its underlying file, as well as any tags related to this DMSDocument. Also calls the
|
||||||
* parent DataObject's delete method.
|
* parent DataObject's delete method.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user