| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey {
/* values
- *
- * @var array
- */
+ *
+ * @var array
+ */
public $_values;
* 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
- * @access public
+ * @return array
+ * array of default values
*/
- function setDefaultValues() {
+ public function setDefaultValues() {
if ($this->_cdType) {
return CRM_Custom_Form_CustomData::setDefaultValues($this);
}
/**
* Build the form object
*
- * @param null
- *
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_cdType) {
/**
* Process the form
*
- * @param null
- *
* @return void
- * @access public
*/
public function postProcess() {
// store the submitted values in an array
if (!empty($this->_values['result_id'])) {
$query = "SELECT COUNT(*) FROM civicrm_survey WHERE result_id = %1";
- $countSurvey = (int)CRM_Core_DAO::singleValueQuery($query,
+ $countSurvey = (int) CRM_Core_DAO::singleValueQuery($query,
array(
- 1 => array($this->_values['result_id'],
+ 1 => array(
+ $this->_values['result_id'],
'Positive',
- ))
+ ),
+ )
);
// delete option group if no any survey is using it.
if (!$countSurvey) {
parent::endPostProcess();
}
-}
+}