listVersions() public method

Result is returned with oldest version first (using version id as it has index and is auto increment).
public listVersions ( integer $contentId ) : eZ\Publish\SPI\Persistence\Content\VersionInfo[]
$contentId integer
return eZ\Publish\SPI\Persistence\Content\VersionInfo[]
Beispiel #1
0
 /**
  * Returns the versions for $contentId.
  *
  * @param int $contentId
  *
  * @return \eZ\Publish\SPI\Persistence\Content\VersionInfo[]
  */
 public function listVersions($contentId)
 {
     return $this->treeHandler->listVersions($contentId);
 }
 /**
  * Returns the versions for $contentId.
  *
  * Result is returned with oldest version first (sorted by created, alternatively version id if auto increment).
  *
  * @param int $contentId
  * @param mixed|null $status Optional argument to filter versions by status, like {@see VersionInfo::STATUS_ARCHIVED}.
  * @param int $limit Limit for items returned, -1 means none.
  *
  * @return \eZ\Publish\SPI\Persistence\Content\VersionInfo[]
  */
 public function listVersions($contentId, $status = null, $limit = -1)
 {
     return $this->treeHandler->listVersions($contentId, $status, $limit);
 }