setStatus() 추상적인 공개 메소드

The $status can be one of STATUS_DRAFT, STATUS_PUBLISHED, STATUS_ARCHIVED
abstract public setStatus ( integer $contentId, integer $version, integer $status ) : boolean
$contentId integer
$version integer
$status integer
리턴 boolean
 /**
  * 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);
     }
 }
예제 #2
0
 /**
  * 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);
 }