/**
* Set variables up before form is built
*
- * @param null
- *
* @return void
*/
public function preProcess() {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @param null
- *
- * @return array array of default values
+ * @return array
+ * array of default values
*/
public function setDefaultValues() {
$defaults = $fieldDefaults = array();
/**
* Build the form object
*
- * @param null
- *
* @return void
*/
public function buildQuickForm() {
)
);
-
// if view mode pls freeze it with the done button.
if ($this->_action & CRM_Core_Action::VIEW) {
$this->freeze();
/**
* Global validation rules for the form
*
- * @param array $fields posted values of the form
+ * @param array $fields
+ * Posted values of the form.
*
* @param $files
* @param CRM_Core_Form $form
*
- * @return array list of errors to be posted back to the form
- * @static
+ * @return array
+ * list of errors to be posted back to the form
*/
public static function formRule($fields, $files, $form) {
- $optionLabel = $fields['label'];
- $optionValue = $fields['value'];
- $fieldId = $form->_fid;
+ $optionLabel = $fields['label'];
+ $optionValue = $fields['value'];
+ $fieldId = $form->_fid;
$optionGroupId = $form->_optionGroupID;
$temp = array();
/**
* Process the form
*
- * @param null
- *
* @return void
*/
public function postProcess() {
}
$fieldValues = array('option_group_id' => $this->_optionGroupID);
- $customOption->weight =
- CRM_Utils_Weight::updateOtherWeights(
+ $customOption->weight
+ = CRM_Utils_Weight::updateOtherWeights(
'CRM_Core_DAO_OptionValue',
$oldWeight,
$params['weight'],
else {
$defVal[] = $customOption->value;
}
- $customField->default_value =
- CRM_Core_DAO::VALUE_SEPARATOR .
+ $customField->default_value
+ = CRM_Core_DAO::VALUE_SEPARATOR .
implode(CRM_Core_DAO::VALUE_SEPARATOR, $defVal) .
CRM_Core_DAO::VALUE_SEPARATOR;
$customField->save();
}
}
- $customField->default_value =
- CRM_Core_DAO::VALUE_SEPARATOR .
+ $customField->default_value
+ = CRM_Core_DAO::VALUE_SEPARATOR .
implode(CRM_Core_DAO::VALUE_SEPARATOR, $tempVal) .
CRM_Core_DAO::VALUE_SEPARATOR;
$customField->save();
}
}
}
-