protected static $category = self::CATEGORY_COMPARISON;
- protected static $params = [
- [
- 'max_expr' => 99,
- 'optional' => FALSE,
- ],
- ];
+ protected static $dataType = 'String';
+
+ protected static function params(): array {
+ return [
+ [
+ 'max_expr' => 99,
+ 'optional' => FALSE,
+ 'ui_defaults' => [
+ ['type' => 'SqlField', 'placeholder' => ts('If')],
+ ['type' => 'SqlField', 'placeholder' => ts('Else')],
+ ],
+ ],
+ ];
+ }
/**
* @return string
}
/**
- * Prevent reformatting
- *
- * @see \Civi\Api4\Utils\FormattingUtil::formatOutputValues
- * @param string $value
- * @param string $dataType
- * @return string|array
+ * @return string
*/
- public function formatOutputValue($value, &$dataType) {
- $dataType = NULL;
- return $value;
+ public static function getDescription(): string {
+ return ts('The first value that is not null.');
}
}