3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
12 namespace Civi\Api4\Query
;
17 class SqlFunctionIF
extends SqlFunction
{
19 protected static $category = self
::CATEGORY_COMPARISON
;
21 protected static $dataType = 'String';
23 protected static function params(): array {
29 'must_be' => ['SqlEquation', 'SqlField', 'SqlFunction', 'SqlString', 'SqlNumber', 'SqlNull'],
31 ['type' => 'SqlField', 'placeholder' => ts('If')],
32 ['type' => 'SqlField', 'placeholder' => ts('Then')],
33 ['type' => 'SqlField', 'placeholder' => ts('Else')],
42 public static function getTitle(): string {
49 public static function getDescription(): string {
50 return ts('If the field is empty, the first value, otherwise the second.');