Merge pull request #15818 from colemanw/fields
[civicrm-core.git] / CRM / Core / Smarty / plugins / block.serialize.php
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 * CiviCRM's Smarty gettext plugin
14 *
15 * @package CRM
16 * @author Donald Lobo <lobo@civicrm.org>
17 * @copyright CiviCRM LLC https://civicrm.org/licensing
18 * $Id$
19 */
20
21 /**
22 * Smarty block function providing serialization support
23 *
24 * See CRM_Core_I18n class documentation for details.
25 *
26 * @param array $params
27 * Template call's parameters.
28 * @param string $text
29 * {serialize} block contents from the template.
30 * @param CRM_Core_Smarty $smarty
31 * The Smarty object.
32 *
33 * @return string
34 * the string, translated by gettext
35 */
36 function smarty_block_serialize($params, $text, &$smarty) {
37 return serialize($text);
38 }