Documentation

CustomFieldTrait

Adds a block of custom fields, as traditionally used in back office receipts.

Table of Contents

Methods

getCustomFieldDisplay()  : array<string|int, mixed>
Given an entity loaded through apiv4 return an array of custom fields for display.
getFilteredCustomFields()  : array<string|int, mixed>
Get a list of custom fields that are 'viewable'.

Methods

getCustomFieldDisplay()

Given an entity loaded through apiv4 return an array of custom fields for display.

protected getCustomFieldDisplay(array<string|int, mixed> $entityRecord, string $entity[, array<string|int, mixed> $filters = [] ]) : array<string|int, mixed>
Parameters
$entityRecord : array<string|int, mixed>
$entity : string
$filters : array<string|int, mixed> = []
Tags
throws
UnknownCurrencyException
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

getFilteredCustomFields()

Get a list of custom fields that are 'viewable'.

protected getFilteredCustomFields(string $entity[, array<string|int, mixed> $extendsEntity = [] ]) : array<string|int, mixed>

Viewable is defined as

  • is_public = TRUE (group level)
  • is_view = FALSE (field level). This indicate a calculated field (which could be private fundraising info) and has not been historically visible as it is not on the edit form.
  • is not acl blocked for the current user (this is used in back office context so the user is an admin not the recipient).
Parameters
$entity : string
$extendsEntity : array<string|int, mixed> = []
Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

        
On this page

Search results