Variant
- Type
- Class
- Namespace
- craft\commerce\gql\arguments\elements
- Inherits
- craft\commerce\gql\arguments\elements\Variant » craft\gql\base\ElementArguments (opens new window) » craft\gql\base\Arguments (opens new window)
- Since
- 3.1
Class Variant
View source (opens new window)
# Public Methods
Method | Description |
---|---|
getArguments() | Returns the argument fields to use in GraphQL type definitions. |
getContentArguments() | Returns arguments defined by the content fields. |
getDraftArguments() (opens new window) | Return the arguments used for elements that support drafts. |
getRevisionArguments() (opens new window) | Return the arguments used for elements that support revisions. |
getStatusArguments() (opens new window) | Return the various status arguments. |
# getArguments()
Returns the argument fields to use in GraphQL type definitions.
View source (opens new window)
Returns
array (opens new window) – $fields
# getContentArguments()
- Since
- 3.1.2
Returns arguments defined by the content fields.
View source (opens new window)
Returns
# Protected Methods
Method | Description |
---|---|
buildContentArguments() (opens new window) | Return the content arguments based on a list of contexts and an element class. |