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 SqlFunctionREPLACE
extends SqlFunction
{
19 protected static $category = self
::CATEGORY_STRING
;
21 protected static function params(): array {
27 'must_be' => ['SqlString', 'SqlField'],
29 ['type' => 'SqlField', 'placeholder' => ts('Source')],
30 ['type' => 'SqlString', 'placeholder' => ts('Find')],
31 ['type' => 'SqlString', 'placeholder' => ts('Replace')],
40 public static function getTitle(): string {
41 return ts('Replace text');
47 public static function getDescription(): string {
48 return ts('Substitutes one value for another in the text.');