Documentation

Admin
in package

Class Admin

Table of Contents

Methods

getAdminSettings()  : array<string|int, mixed>
Returns clientside data needed for the `crmSearchAdmin` Angular module.
getEntityRefJoins()  : array<string|int, array<string|int, mixed>>
Get joins for entity reference custom fields, and the entity_id field in multi-record custom groups.
getJoins()  : array<string|int, mixed>
Find all the ways each entity can be joined.
getOperators()  : array<string|int, string>
Returns operators supported by SearchKit with translated labels.
getSchema()  : array<string|int, array<string|int, mixed>>
Fetch all entities the current user has permission to `get`.
getStyles()  : array<string|int, string>
Returns list of css style names (based on Bootstrap3).
addImplicitFKFields()  : array<string|int, mixed>
Add in FK fields for implicit joins.
getDateFormats()  : array<string|int, mixed>
getDefaultColumns()  : array<string|int, mixed>
Build default columns - these are used when creating a new search with this entity
getJoinConditions()  : array<string|int, array<string|int, mixed>>
Fill in boilerplate join clause with supplied values.
getJoinDefaults()  : array<string|int, mixed>
Calculate default conditions for a join.
getReference()  : CRM_Core_Reference_Basic
Find the reference for a given fieldName.
getSqlFunctions()  : array<string|int, mixed>
Get all sql functions that can be used in SearchKit.

Methods

getAdminSettings()

Returns clientside data needed for the `crmSearchAdmin` Angular module.

public static getAdminSettings() : array<string|int, mixed>
Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

getEntityRefJoins()

Get joins for entity reference custom fields, and the entity_id field in multi-record custom groups.

public static getEntityRefJoins(array<string|int, mixed> $entity, array<string|int, mixed> $field) : array<string|int, array<string|int, mixed>>
Parameters
$entity : array<string|int, mixed>
$field : array<string|int, mixed>
Return values
array<string|int, array<string|int, mixed>>

getJoins()

Find all the ways each entity can be joined.

public static getJoins(array<string|int, mixed> $allowedEntities) : array<string|int, mixed>
Parameters
$allowedEntities : array<string|int, mixed>
Return values
array<string|int, mixed>

getOperators()

Returns operators supported by SearchKit with translated labels.

public static getOperators() : array<string|int, string>

This is a subset of APIv4 operators; some redundant ones are omitted for clarity.

Return values
array<string|int, string>

getSchema()

Fetch all entities the current user has permission to `get`.

public static getSchema() : array<string|int, array<string|int, mixed>>
Tags
throws
CRM_Core_Exception
Return values
array<string|int, array<string|int, mixed>>

getStyles()

Returns list of css style names (based on Bootstrap3).

public static getStyles() : array<string|int, string>
Return values
array<string|int, string>

addImplicitFKFields()

Add in FK fields for implicit joins.

private static addImplicitFKFields(array<string|int, mixed> $schema) : array<string|int, mixed>

For example, add a campaign_id.title field to the Contribution entity.

Parameters
$schema : array<string|int, mixed>
Return values
array<string|int, mixed>

getDateFormats()

private static getDateFormats() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDefaultColumns()

Build default columns - these are used when creating a new search with this entity

private static getDefaultColumns(array<string|int, mixed> $entity, iterable<string|int, mixed> $getFields) : array<string|int, mixed>
Parameters
$entity : array<string|int, mixed>
$getFields : iterable<string|int, mixed>
Return values
array<string|int, mixed>

getJoinConditions()

Fill in boilerplate join clause with supplied values.

private static getJoinConditions(string $nearCol, string $farCol[, string|null $dynamicValue = NULL ][, string|null $dynamicCol = NULL ]) : array<string|int, array<string|int, mixed>>
Parameters
$nearCol : string
$farCol : string
$dynamicValue : string|null = NULL
$dynamicCol : string|null = NULL
Return values
array<string|int, array<string|int, mixed>>

getJoinDefaults()

Calculate default conditions for a join.

private static getJoinDefaults(string $alias, array<string|int, mixed> ...$entities) : array<string|int, mixed>
Parameters
$alias : string
$entities : array<string|int, mixed>
Tags
throws
CRM_Core_Exception
throws
NotImplementedException
Return values
array<string|int, mixed>

getSqlFunctions()

Get all sql functions that can be used in SearchKit.

private static getSqlFunctions() : array<string|int, mixed>

Includes the generic "Arithmetic" pseudo-function.

Return values
array<string|int, mixed>

        
On this page

Search results