API Rename DMSDocument::getFileName to getFilename

This commit is contained in:
Robbie Averill 2017-06-08 09:54:40 +12:00
parent 6b63f738d7
commit 14071eee3c
3 changed files with 3 additions and 2 deletions

View File

@ -511,7 +511,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface
* *
* @return string * @return string
*/ */
public function getFileName() public function getFilename()
{ {
if ($this->getField('Filename')) { if ($this->getField('Filename')) {
return $this->getField('Filename'); return $this->getField('Filename');

View File

@ -33,6 +33,7 @@ this process.
* `DMSDocument::addTag`, `::getTagsList`, `::removeTag` and `::removeAllTags` removed from the `DMSDocument` and `DMSDocumentInterface`. Please use the ORM relationship created by applying the `DMSDocumentTaxonomyExtension` extension to `DMSDocument` instead. * `DMSDocument::addTag`, `::getTagsList`, `::removeTag` and `::removeAllTags` removed from the `DMSDocument` and `DMSDocumentInterface`. Please use the ORM relationship created by applying the `DMSDocumentTaxonomyExtension` extension to `DMSDocument` instead.
* `DMSInterface::getByTag` removed from `DMSInterface` and `DMS`. Use ORM relationships from applying `DMSDocumentTaxonomyExtension` to `DMSDocument` instead. * `DMSInterface::getByTag` removed from `DMSInterface` and `DMS`. Use ORM relationships from applying `DMSDocumentTaxonomyExtension` to `DMSDocument` instead.
* `DMSGridFieldDeleteAction` removed * `DMSGridFieldDeleteAction` removed
* `DMSDocument::getFileName` renamed to `DMSDocument::getFilename` for consistency
## Template changes ## Template changes

View File

@ -254,7 +254,7 @@ class DMSDocumentTest extends SapphireTest
Config::inst()->update('DMS', 'folder_name', 'assets/_unit-tests'); Config::inst()->update('DMS', 'folder_name', 'assets/_unit-tests');
$document = DMS::inst()->storeDocument('dms/tests/DMS-test-lorum-file.pdf'); $document = DMS::inst()->storeDocument('dms/tests/DMS-test-lorum-file.pdf');
$filename = $document->getStorageFolder() . '/' . $document->getFileName(); $filename = $document->getStorageFolder() . '/' . $document->getFilename();
$this->assertTrue(file_exists($filename)); $this->assertTrue(file_exists($filename));
$document->delete(); $document->delete();