GqlEntityRegistry ​
- Type
- Class
- Namespace
- craft\gql
- Inherits
- craft\gql\GqlEntityRegistry
- Since
- 3.3.0
Class GqlEntityRegistry
Public Methods ​
| Method | Description |
|---|---|
| createEntity() | Create an entity registry entry. |
| flush() | Flush all registered entities. |
| getEntity() | Return a registered entity. |
| getOrCreate() | Returns a registered entity, creating it in the process if it doesn’t exist yet. |
| 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.
Arguments ​
$entityName(string)$entity(mixed)
Returns ​
mixed
flush() ​
Flush all registered entities.
getEntity() ​
Return a registered entity.
Arguments ​
$entityName(string)
Returns ​
mixed
getOrCreate() ​
- Since
- 4.5.0
Returns a registered entity, creating it in the process if it doesn’t exist yet.
Arguments ​
Returns ​
mixed
getPrefix() ​
- Since
- 3.6.0
Returns the type prefix.
Returns ​
prefixTypeName() ​
Prefix GQL type name with the configured prefix.
Arguments ​
$typeName(string)
Returns ​
setPrefix() ​
- Since
- 3.6.0
Sets the type prefix.
Arguments ​
$prefix(string)