eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway\ExceptionConversion::setContentState PHP Method

setContentState() public method

Sets the object state $stateId to content with $contentId ID.
public setContentState ( mixed $contentId, mixed $groupId, mixed $stateId )
$contentId mixed
$groupId mixed
$stateId mixed
    public function setContentState($contentId, $groupId, $stateId)
    {
        try {
            return $this->innerGateway->setContentState($contentId, $groupId, $stateId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }