add new method SeedDMS_Core_Document::isLatestContent()

This commit is contained in:
Uwe Steinmann 2020-08-21 13:19:22 +02:00
parent ad8a501506
commit b083ebb40e
2 changed files with 12 additions and 0 deletions

View File

@ -1806,6 +1806,17 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
}
} /* }}} */
/**
* Check if a given version is the latest version of the document
*
* @param integer $version version number of content element
* @return SeedDMS_Core_DocumentContent|boolean object of class {@link SeedDMS_Core_DocumentContent}
* or false
*/
function isLatestContent($version) { /* {{{ */
return $this->getLatestContent()->getVersion() == $version;
} /* }}} */
/**
* @return bool|null|SeedDMS_Core_DocumentContent
*/

View File

@ -27,6 +27,7 @@
- add method SeedDMS_Core_Document::setParent() as an alias for setFolder()
- clear the save content list and latest content in SeedDMS_Core_Document after
a version has been deleted.
- new method SeedDMS_Core_Document::isLatestVersion()
</notes>
<contents>
<dir baseinstalldir="SeedDMS" name="/">