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 https://civicrm.org/licensing
21 * Grab the button type from a passed button element 'name' by checking for reserved QF button type strings
23 * @param string $btnName
26 * button type, one of: 'upload', 'next', 'back', 'cancel', 'refresh'
27 * 'submit', 'done', 'display', 'jump' 'process'
29 function smarty_modifier_crmBtnType($btnName) {
30 // split the string into 5 or more
31 // button name are typically: '_qf_Contact_refresh' OR '_qf_Contact_refresh_dedupe'
32 // button type is always the 3rd element
34 $substr = CRM_Utils_System
::explode('_', $btnName, 5);