Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 5 | | | |
bc77d7c0 TO |
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 | | |
6a488035 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
6a488035 TO |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
6a488035 TO |
16 | * $Id$ |
17 | * | |
1cd3ffa9 EM |
18 | * @param $tpl_name |
19 | * @param $tpl_source | |
20 | * @param $smarty_obj | |
21 | * | |
22 | * @return bool | |
6a488035 TO |
23 | */ |
24 | function civicrm_smarty_resource_string_get_template($tpl_name, &$tpl_source, &$smarty_obj) { | |
25 | $tpl_source = $tpl_name; | |
26 | return TRUE; | |
27 | } | |
28 | ||
a0ee3941 | 29 | /** |
100fef9d | 30 | * @param string $tpl_name |
a0ee3941 | 31 | * @param $tpl_timestamp |
16b10e64 | 32 | * @param CRM_Core_Smarty $smarty_obj |
a0ee3941 EM |
33 | * |
34 | * @return bool | |
35 | */ | |
6a488035 TO |
36 | function civicrm_smarty_resource_string_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_obj) { |
37 | $tpl_timestamp = time(); | |
38 | return TRUE; | |
39 | } | |
40 | ||
a0ee3941 | 41 | /** |
100fef9d | 42 | * @param string $tpl_name |
16b10e64 | 43 | * @param CRM_Core_Smarty $smarty_obj |
a0ee3941 EM |
44 | * |
45 | * @return bool | |
46 | */ | |
6a488035 TO |
47 | function civicrm_smarty_resource_string_get_secure($tpl_name, &$smarty_obj) { |
48 | return TRUE; | |
49 | } | |
50 | ||
a0ee3941 | 51 | /** |
100fef9d | 52 | * @param string $tpl_name |
16b10e64 | 53 | * @param CRM_Core_Smarty $smarty_obj |
a0ee3941 | 54 | */ |
2aa397bc TO |
55 | function civicrm_smarty_resource_string_get_trusted($tpl_name, &$smarty_obj) { |
56 | ||
57 | } | |
6a488035 TO |
58 | |
59 | function civicrm_smarty_register_string_resource() { | |
60 | $template = CRM_Core_Smarty::singleton(); | |
be2fb01f | 61 | $template->register_resource('string', [ |
518fa0ee SL |
62 | 'civicrm_smarty_resource_string_get_template', |
63 | 'civicrm_smarty_resource_string_get_timestamp', | |
64 | 'civicrm_smarty_resource_string_get_secure', | |
65 | 'civicrm_smarty_resource_string_get_trusted', | |
66 | ]); | |
6a488035 | 67 | } |