Merge pull request #22532 from seamuslee001/dev_core_3034
[civicrm-core.git] / CRM / Core / Smarty / plugins / modifier.crmStripAlternatives.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
bc77d7c0
TO
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 |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
16 */
17
18/**
19 * Given an ezComponents-parsed representation of
20 * a text with alternatives return only the first one
21 *
6a0b768e
TO
22 * @param string $full
23 * All alternatives as a long string (or some other text).
6a488035 24 *
a6c01b45 25 * @return string
353ffa53 26 * only the first alternative found (or the text without alternatives)
6a488035
TO
27 */
28function smarty_modifier_crmStripAlternatives($full) {
29 return CRM_Utils_String::stripAlternatives($full);
30}