| 1 | <?php |
| 2 | /* |
| 3 | +--------------------------------------------------------------------+ |
| 4 | | Copyright CiviCRM LLC. All rights reserved. | |
| 5 | | | |
| 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 | +--------------------------------------------------------------------+ |
| 10 | */ |
| 11 | |
| 12 | /** |
| 13 | * This file contains various support functions for test entities in CiviCRM. |
| 14 | * Historically there is a lot of inconsistency as to how test entities are displayed. |
| 15 | * This class helps resolve that. |
| 16 | * |
| 17 | * @package CRM |
| 18 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
| 19 | */ |
| 20 | |
| 21 | /** |
| 22 | * Class CRM_Core_TestEntity. |
| 23 | */ |
| 24 | class CRM_Core_TestEntity { |
| 25 | |
| 26 | // @todo extend this class to include functions that control when/where test entities are displayed |
| 27 | // and then use those functions everywhere we can display test transactions. |
| 28 | // Ideally the display of test transactions would be a per-user setting or permission |
| 29 | // so it can be toggled on/off as required and does not affect "day-to-day" usage. |
| 30 | |
| 31 | /** |
| 32 | * Append "test" text to a string. eg. Member Dues (test) or My registration (test) |
| 33 | * |
| 34 | * @param string $text |
| 35 | * |
| 36 | * @return string |
| 37 | */ |
| 38 | public static function appendTestText($text) { |
| 39 | return $text . ' ' . ts('(test)'); |
| 40 | } |
| 41 | |
| 42 | } |