<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatusType {
+ /**
+ * @param $params
+ *
+ * @return $this|null
+ */
static function add(&$params) {
if (empty($params)) {
return NULL;
return $dao->save();
}
+ /**
+ * @param $params
+ *
+ * @return $this|null
+ */
static function &create(&$params) {
$transaction = new CRM_Core_Transaction();
$statusType = self::add($params);
return $statusType;
}
+ /**
+ * @param $id
+ *
+ * @return bool
+ */
static function deleteParticipantStatusType($id) {
// return early if there are participants with this status
$participant = new CRM_Event_DAO_Participant;
return TRUE;
}
+ /**
+ * @param $params
+ * @param $defaults
+ *
+ * @return CRM_Event_DAO_ParticipantStatusType|null
+ */
static function retrieve(&$params, &$defaults) {
$result = NULL;
return $result;
}
+ /**
+ * @param $id
+ * @param $isActive
+ *
+ * @return bool
+ */
static function setIsActive($id, $isActive) {
return CRM_Core_DAO::setFieldValue('CRM_Event_BAO_ParticipantStatusType', $id, 'is_active', $isActive);
}
- public function process($params) {
+ /**
+ * @param $params
+ *
+ * @return array
+ */
+ public static function process($params) {
$returnMessages = array();