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 54
static bool
correctDuplicateWeights(string $daoName, array $fieldValues = NULL, string $weightField = 'weight')
Correct duplicate weight entries by putting them (duplicate weights) in sequence.
at line 101
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 138
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 204
static int
getNewWeight(string $daoName, array $fieldValues = NULL, string $weightField = 'weight')
Returns the new calculated weight.
at line 246
static int
getMax(string $daoName, array $fieldValues = NULL, string $weightField = 'weight')
Returns the highest weight.
at line 269
static int
getDefaultWeight(string $daoName, array $fieldValues = NULL, string $weightField = 'weight')
Returns the default weight ( highest weight + 1 ) to be used.
at line 294
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