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 +--------------------------------------------------------------------+
15 * @author Andrew Hunt, AGH Strategies
21 * Display an icon with some alternative text.
23 * This is a wrapper around CRM_Core_Page::icon().
26 * - condition: if present and falsey, return empty
27 * - icon: the icon class to display instead of fa-check
30 * The translated text to include in the icon's title and screen-reader text.
36 function smarty_block_icon($params, $text, &$smarty) {
37 $condition = array_key_exists('condition', $params) ?
$params['condition'] : 1;
38 $icon = $params['icon'] ??
'fa-check';
39 return CRM_Core_Page
::crmIcon($icon, $text, $condition);