/** * Returns a user friendly text explaining the condition params * e.g. 'Older than 65' * * @return string * @access public */ public function userFriendlyConditionParams() { $userFriendlyConditionParams = parent::userFriendlyConditionParams(); $period = CRM_CivirulesConditions_Utils_Period::userFriendlyConditionParams($this->conditionParams); return ts('Total amount') . ' ' . $period . ' ' . $userFriendlyConditionParams; }
/** * Returns a user friendly text explaining the condition params * e.g. 'Older than 65' * * @return string * @access public */ public function userFriendlyConditionParams() { $operator = null; switch ($this->conditionParams['operator']) { case 1: $operator = 'is not equal to'; break; case 2: $operator = 'bigger than'; break; case 3: $operator = 'bigger than or equal to'; break; case 4: $operator = 'less than'; break; case 5: $operator = 'less than or equal to'; break; default: $operator = 'is equal to'; break; } $period = CRM_CivirulesConditions_Utils_Period::userFriendlyConditionParams($this->conditionParams); return 'Distinct number of contributing days ' . $operator . ' ' . $this->conditionParams['no_of_days'] . ' ' . $period; }