GqlEntityRegistry
- Type
- Class
- Namespace
- craft\gql
- Inherits
- craft\gql\GqlEntityRegistry
- Since
- 3.3.0
Class GqlEntityRegistry
View source (opens new window)
# Public Methods
Method | Description |
---|---|
createEntity() | Create an entity registry entry. |
flush() | Flush all registered entities. |
getEntity() | Get a registered entity. |
getPrefix() | Returns the type prefix. |
prefixTypeName() | Prefix GQL type name with the configured prefix. |
setPrefix() | Sets the type prefix. |
# createEntity()
Create an entity registry entry.
View source (opens new window)
Arguments
$entityName
(string (opens new window))$entity
(mixed
)
Returns
mixed
# flush()
Flush all registered entities.
View source (opens new window)
# getEntity()
Get a registered entity.
View source (opens new window)
Arguments
$entityName
(string (opens new window))
Returns
mixed
# getPrefix()
- Since
- 3.6.0
Returns the type prefix.
View source (opens new window)
Returns
string (opens new window), null (opens new window)
# prefixTypeName()
Prefix GQL type name with the configured prefix.
View source (opens new window)
Arguments
$typeName
(string (opens new window))
Returns
# setPrefix()
- Since
- 3.6.0
Sets the type prefix.
View source (opens new window)
Arguments
$prefix
(string (opens new window))