CRM_Utils_Weight
class CRM_Utils_Weight
Class CRM_Utils_Weight
Properties
static array, | $SIGNABLE_FIELDS |
Methods
Correct duplicate weight entries by putting them (duplicate weights) in sequence.
Remove a row from the specified weight, and shift all rows below it up
Updates the weight fields of other rows according to the new and old weight passed in.
Returns the new calculated weight.
Returns the highest weight.
Returns the default weight ( highest weight + 1 ) to be used.
Execute a weight-related query
No description
No description
No description
Details
at line 55
static bool
correctDuplicateWeights(string $daoName, array $fieldValues = NULL, string $weightField = 'weight')
Correct duplicate weight entries by putting them (duplicate weights) in sequence.
at line 102
static bool
delWeight(string $daoName, int $fieldID, array $fieldValues = NULL, string $weightField = 'weight')
Remove a row from the specified weight, and shift all rows below it up
at line 139
static int
updateOtherWeights(string $daoName, int $oldWeight, int $newWeight, array $fieldValues = NULL, string $weightField = 'weight')
Updates the weight fields of other rows according to the new and old weight passed in.
And returns the new weight be used. If old-weight not present, Creates a gap for a new row to be inserted at the specified new weight
at line 205
static int
getNewWeight(string $daoName, array $fieldValues = NULL, string $weightField = 'weight')
Returns the new calculated weight.
at line 247
static int
getMax(string $daoName, array $fieldValues = NULL, string $weightField = 'weight')
Returns the highest weight.
at line 270
static int
getDefaultWeight(string $daoName, array $fieldValues = NULL, string $weightField = 'weight')
Returns the default weight ( highest weight + 1 ) to be used.
at line 295
static CRM_Core_DAO
query(string $queryType, string $daoName, array $fieldValues = NULL, string $queryData, null $additionalWhere = NULL, string $orderBy = NULL, null $groupBy = NULL)
Execute a weight-related query