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
28 * - anything else is passed along as attributes for the icon
31 * The translated text to include in the icon's title and screen-reader text.
37 function smarty_block_icon($params, $text, &$smarty) {
38 $condition = array_key_exists('condition', $params) ?
$params['condition'] : 1;
39 $icon = $params['icon'] ??
'fa-check';
44 return CRM_Core_Page
::crmIcon($icon, $text, $condition, array_diff_key($params, $dontPass));