/** * Sets the state of object identified by $contentId and $version to $state. * * The $status can be one of STATUS_DRAFT, STATUS_PUBLISHED, STATUS_ARCHIVED * * @param int $contentId * @param int $version * @param int $status * * @return boolean */ public function setStatus($contentId, $version, $status) { try { return $this->innerGateway->setStatus($contentId, $version, $status); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }
/** * Sets the status of object identified by $contentId and $version to $status. * * The $status can be one of VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED * When status is set to VersionInfo::STATUS_PUBLISHED content status is updated to ContentInfo::STATUS_PUBLISHED * * @param int $contentId * @param int $status * @param int $version * * @return bool */ public function setStatus($contentId, $status, $version) { return $this->contentGateway->setStatus($contentId, $version, $status); }