class CRM_Upgrade_Incremental_SmartGroups

Methods

updateGroups($actions)

Perform updates specified by upgrade function.

datePickerConversion(array $fields)

Convert any

convertEqualsStringToInArray(string $field)

Conversion routine for a form change change from = string to IN array.

string
getConvertedDateValue(string $dateValue, bool $isEndOfDay)

Get converted date value.

renameField(string $oldName, string $newName)

Rename a smartgroup field.

renameFields(array $pairs)

Rename pairs of fields

mixed
getSearchesWithField($field)

No description

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

convertCustomSmartGroups()

Convert Custom date fields in smart groups

Details

at line 40
updateGroups($actions)

Perform updates specified by upgrade function.

Parameters

$actions

at line 57
datePickerConversion(array $fields)

Convert any

Parameters

array $fields

at line 162
convertEqualsStringToInArray(string $field)

Conversion routine for a form change change from = string to IN array.

For example a checkbox expected [$fieldName, '=', 1] whereas select expects [$fieldName, 'IN', [1]]

Parameters

string $field

at line 189
protected string getConvertedDateValue(string $dateValue, bool $isEndOfDay)

Get converted date value.

Parameters

string $dateValue
bool $isEndOfDay Is this the upper value in a search range? If so alter the time to get the end of day if none set.

Return Value

string $dateValue

at line 207
renameField(string $oldName, string $newName)

Rename a smartgroup field.

Parameters

string $oldName
string $newName

at line 240
renameFields(array $pairs)

Rename pairs of fields

Parameters

array $pairs 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'], ]

at line 250
protected mixed getSearchesWithField($field)

Parameters

$field

Return Value

mixed

at line 263
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

at line 299
convertCustomSmartGroups()

Convert Custom date fields in smart groups