Documentation

CRM_Utils_JSON
in package

Class handles functions for JSON format

Table of Contents

Methods

encodeDataTableSelector()  : string
Do not use this function. See CRM-16353.
isValidJSON()  : bool
Test whether the input string is valid JSON.
output()  : mixed
Output json to the client.

Methods

encodeDataTableSelector()

Do not use this function. See CRM-16353.

public static encodeDataTableSelector(array<string|int, mixed> $params, int $sEcho, int $iTotal, int $iFilteredTotal, array<string|int, mixed> $selectorElements) : string
Parameters
$params : array<string|int, mixed>

Associated array of row elements.

$sEcho : int

Datatable needs this to make it more secure.

$iTotal : int

Total records.

$iFilteredTotal : int

Total records on a page.

$selectorElements : array<string|int, mixed>

Selector elements.

Return values
string

isValidJSON()

Test whether the input string is valid JSON.

public static isValidJSON(string $str) : bool
Parameters
$str : string
Return values
bool

output()

Output json to the client.

public static output(mixed $input) : mixed
Parameters
$input : mixed

        
On this page

Search results