eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RestContentTypeBase::serializeStatus PHP Method

serializeStatus() protected method

Serializes the given $contentTypeStatus to a string representation.
protected serializeStatus ( integer $contentTypeStatus ) : string
$contentTypeStatus integer
return string
    protected function serializeStatus($contentTypeStatus)
    {
        switch ($contentTypeStatus) {
            case Values\ContentType\ContentType::STATUS_DEFINED:
                return 'DEFINED';
            case Values\ContentType\ContentType::STATUS_DRAFT:
                return 'DRAFT';
            case Values\ContentType\ContentType::STATUS_MODIFIED:
                return 'MODIFIED';
        }
        throw new \RuntimeException("Unknown content type status: '{$contentTypeStatus}'.");
    }