uawdijnntqw1x1x1
IP : 216.73.216.15
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
craftcms
/
commerce
/
src
/
.
/
.
/
fields
/
.
/
Variants.php
/
/
<?php /** * @link https://craftcms.com/ * @copyright Copyright (c) Pixel & Tonic, Inc. * @license https://craftcms.github.io/license/ */ namespace craft\commerce\fields; use Craft; use craft\commerce\elements\Variant; use craft\commerce\gql\arguments\elements\Variant as VariantArguments; use craft\commerce\gql\interfaces\elements\Variant as VariantInterface; use craft\commerce\gql\resolvers\elements\Variant as VariantResolver; use craft\fields\BaseRelationField; use craft\helpers\Gql as GqlHelper; use craft\services\Gql as GqlService; use GraphQL\Type\Definition\Type; /** * Class Variant Field * * @author Pixel & Tonic, Inc. <support@pixelandtonic.com> * @since 2.0 * * @property-read array $contentGqlType */ class Variants extends BaseRelationField { /** * @inheritdoc */ public static function displayName(): string { return Craft::t('commerce', 'Commerce Variants'); } /** * @inheritdoc */ public static function defaultSelectionLabel(): string { return Craft::t('commerce', 'Add a variant'); } /** * @inheritdoc * @since 3.1.4 */ public function getContentGqlType(): array|Type { return [ 'name' => $this->handle, 'type' => Type::listOf(VariantInterface::getType()), 'args' => VariantArguments::getArguments(), 'resolve' => VariantResolver::class . '::resolve', 'complexity' => GqlHelper::relatedArgumentComplexity(GqlService::GRAPHQL_COMPLEXITY_EAGER_LOAD), ]; } /** * @inheritdoc */ public static function elementType(): string { return Variant::class; } }
/srv/users/craft4/apps/craft4-newsite-space/vendor/craftcms/commerce/src/././fields/./Variants.php