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 * @copyright CiviCRM LLC
20 * Fetch an attribute from html
22 * @param array $params
23 * @param CRM_Core_Smarty $smarty
27 function smarty_function_crmGetAttribute($params, &$smarty) {
29 if (preg_match('#\W' . $params['attr'] . '="([^"]+)#', $params['html'], $matches)) {
32 if (!empty($params['assign'])) {
33 $smarty->assign($params['assign'], $ret);