Exemple #1
0
 /**
  * Add the Persistent Record.
  *
  * @param array $params
  *   Reference array contains the values submitted by the form.
  * @param array $ids
  *   Reference array contains the id.
  *
  *
  * @return object
  */
 public static function add(&$params, &$ids)
 {
     if (CRM_Utils_Array::value('is_config', $params) == 1) {
         $params['data'] = serialize(explode(',', $params['data']));
     }
     $persistentDAO = new CRM_Core_DAO_Persistent();
     $persistentDAO->copyValues($params);
     $persistentDAO->id = CRM_Utils_Array::value('persistent', $ids);
     $persistentDAO->save();
     return $persistentDAO;
 }