class RelationExistenceHelper

Report relation names, such as those an eager load or relationship query names, that a model does not define.

Methods

__construct(ModelRuleHelper $modelRuleHelper, ModelHelper $modelHelper, ModelRelationsExtension $modelRelations, RuntimeInputs $runtimeInputs)

Create a relation existence helper.

array
check(Type $relations, Type $modelType, Node $node, Scope $scope, bool $aggregate = false, bool $selectsColumns = true, bool $followsPaths = true)

Report each relation, or segment of a dotted relation path, that the queried model does not define.

Details

at line 45
__construct(ModelRuleHelper $modelRuleHelper, ModelHelper $modelHelper, ModelRelationsExtension $modelRelations, RuntimeInputs $runtimeInputs)

Create a relation existence helper.

Parameters

ModelRuleHelper $modelRuleHelper
ModelHelper $modelHelper
ModelRelationsExtension $modelRelations
RuntimeInputs $runtimeInputs

at line 61
array check(Type $relations, Type $modelType, Node $node, Scope $scope, bool $aggregate = false, bool $selectsColumns = true, bool $followsPaths = true)

Report each relation, or segment of a dotted relation path, that the queried model does not define.

Parameters

Type $relations
Type $modelType
Node $node
Scope $scope
bool $aggregate
bool $selectsColumns

whether a name may end with a column selection, such as posts:id

bool $followsPaths

whether a dotted name is a path through related models

Return Value

array