Documentation

CRM_Export_Utils
in package

Table of Contents

Methods

getExportFields()  : array<string|int, mixed>
This transforms the lists of fields for each contact type & component into a single unified list suitable for select2.

Methods

getExportFields()

This transforms the lists of fields for each contact type & component into a single unified list suitable for select2.

public static getExportFields(mixed $exportMode) : array<string|int, mixed>

The return values of CRM_Core_BAO_Mapping::getBasicFields contain a separate field list for every contact type and sub-type. This is extremely redundant as 90%+ of the fields in each list are the same. To avoid sending bloated data to the client-side, we turn it into a single list where fields not shared by every contact type get a contact_type attribute so they can be filtered appropriately by the selector.

We also sort fields into optgroup categories, and add component fields appropriate to this export.

Parameters
$exportMode : mixed
Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

        
On this page

Search results