/** * Returns the value for the data comparison * * @return mixed * @access protected */ protected function getComparisonValue() { $value = parent::getComparisonValue(); if (!empty($value)) { return $this->normalizeValue($value); } else { return null; } }
/** * Returns a user friendly text explaining the condition params * e.g. 'Older than 65' * * @return string * @access public */ public function userFriendlyConditionParams() { $userFriendlyConditionParams = parent::userFriendlyConditionParams(); $periods = CRM_CivirulesConditions_Utils_Period::Options(); if (isset($periods[$this->conditionParams['period']])) { $period = $periods[$this->conditionParams['period']]; } else { $period = ts('all time'); } 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() { $userFriendlyConditionParams = parent::userFriendlyConditionParams(); $period = CRM_CivirulesConditions_Utils_Period::userFriendlyConditionParams($this->conditionParams); return ts('Total amount') . ' ' . $period . ' ' . $userFriendlyConditionParams; }