Source of file VersionedStatus.php
Size: 1,363 Bytes - Last Modified: 2021-12-23T10:35:47+00:00
/var/www/docs.ssmods.com/process/src/_legacy/GraphQL/Types/VersionedStatus.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 | <?php namespace SilverStripe\Versioned\GraphQL\Types; use GraphQL\Type\Definition\EnumType; use SilverStripe\GraphQL\TypeCreator; // GraphQL dependency is optional in versioned, // and legacy implementation relies on existence of this class (in GraphQL v3) if (!class_exists(TypeCreator::class)) { return; } /** * @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality. */ class VersionedStatus extends TypeCreator { /** * @return EnumType */ public function toType() { return new EnumType([ 'name' => 'VersionedStatus', 'description' => 'The stage to read from or write to', 'values' => [ 'PUBLISHED' => [ 'value' => 'published', 'description' => 'Only published records', ], 'DRAFT' => [ 'value' => 'draft', 'description' => 'Only draft records', ], 'ARCHIVED' => [ 'value' => 'archived', 'description' => 'Only records that have been archived', ], 'MODIFIED' => [ 'value' => 'modified', 'description' => 'Only records that have unpublished changes', ], ], ]); } } |