CRM_Upgrade_Incremental_SmartGroups
in package
Tags
Table of Contents
Methods
- convertCustomSmartGroups() : mixed
- Convert Custom date fields in smart groups
- convertEqualsStringToInArray() : mixed
- Conversion routine for a form change change from = string to IN array.
- datePickerConversion() : mixed
- Convert any
- renameField() : mixed
- Rename a smartgroup field.
- renameFields() : mixed
- Rename pairs of fields
- renameLogFields() : mixed
- Convert the log_date saved search date fields to their correct name default to switching to created_date as that is what the code did originally
- updateGroups() : mixed
- Perform updates specified by upgrade function.
- getConvertedDateValue() : string
- Get converted date value.
- getSearchesWithField() : mixed
Methods
convertCustomSmartGroups()
Convert Custom date fields in smart groups
public
convertCustomSmartGroups() : mixed
convertEqualsStringToInArray()
Conversion routine for a form change change from = string to IN array.
public
convertEqualsStringToInArray(string $field) : mixed
For example a checkbox expected [$fieldName, '=', 1] whereas select expects [$fieldName, 'IN', [1]]
Parameters
- $field : string
datePickerConversion()
Convert any
public
datePickerConversion(array<string|int, mixed> $fields) : mixed
Parameters
- $fields : array<string|int, mixed>
renameField()
Rename a smartgroup field.
public
renameField(string $oldName, string $newName) : mixed
Parameters
- $oldName : string
- $newName : string
renameFields()
Rename pairs of fields
public
renameFields(array<string|int, mixed> $pairs) : mixed
Parameters
- $pairs : array<string|int, mixed>
-
Array or arrays of pairs - e.g [ ['old' => 'activity_date', 'new' => 'activity_date_time'], ['old' => 'activity_date_low', 'new' => 'activity_date_time_low'], ['old' => 'activity_date_high', 'new' => 'activity_date_time_high'], ['old' => 'activity_date_relative', 'new' => 'activity_date_time_relative'], ]
renameLogFields()
Convert the log_date saved search date fields to their correct name default to switching to created_date as that is what the code did originally
public
renameLogFields() : mixed
updateGroups()
Perform updates specified by upgrade function.
public
updateGroups(mixed $actions) : mixed
Parameters
- $actions : mixed
getConvertedDateValue()
Get converted date value.
protected
getConvertedDateValue(string $dateValue, bool $isEndOfDay) : string
Parameters
- $dateValue : string
- $isEndOfDay : bool
-
Is this the upper value in a search range? If so alter the time to get the end of day if none set.
Return values
string —$dateValue
getSearchesWithField()
protected
getSearchesWithField(mixed $field) : mixed
Parameters
- $field : mixed