Joiner
in package
Table of Contents
Properties
- $cache : array<string|int, array<string|int, Joinable>>
- $schemaMap : SchemaMap
Methods
- __construct() : mixed
- getExtraJoinSql() : string
- SpecProvider callback for joins added via a SchemaMapSubscriber.
- getPath() : array<string|int, Joinable>
- Get the path used to create an implicit join
Properties
$cache
protected
array<string|int, array<string|int, Joinable>>
$cache
= []
$schemaMap
protected
SchemaMap
$schemaMap
Methods
__construct()
public
__construct(SchemaMap $schemaMap) : mixed
Parameters
- $schemaMap : SchemaMap
getExtraJoinSql()
SpecProvider callback for joins added via a SchemaMapSubscriber.
public
static getExtraJoinSql(array<string|int, mixed> $field, Api4SelectQuery $query) : string
This works for extra joins declared via SchemaMapSubscriber.
It allows implicit joins through custom sql, by virtue of the fact
that $query->getField
will create the join not just to the id
field
but to every field on the joined entity, allowing e.g. joins to address_primary.country_id:label
.
Parameters
- $field : array<string|int, mixed>
- $query : Api4SelectQuery
Return values
stringgetPath()
Get the path used to create an implicit join
public
getPath(string $baseTable, array<string|int, mixed> $joinPath) : array<string|int, Joinable>
Parameters
- $baseTable : string
- $joinPath : array<string|int, mixed>