Completed
Branch BUG-10636-remove-unnecessary-b... (5637a2)
by
unknown
32:51 queued 21:51
created

CountrySettingsAdmin::url()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Page;
4
5
/**
6
 * CountrySettingsAdmin
7
 * Selectors/references for elements in the Country Settings Admin page.
8
 *
9
 * @package Page
10
 * @author  Darren Ethier
11
 * @since   1.0.0
12
 */
13
class CountrySettingsAdmin extends CoreAdmin
14
{
15
16
17
    const COUNTRY_SETTINGS_SAVE_BUTTON = '#country_settings_save_2';
18
19
20
21
    /**
22
     * Return the url for the country settings admin page.
23
     * @param string $additional_params
24
     * @return string
25
     */
26
    public static function url($additional_params = '')
27
    {
28
        return self::adminUrl('espresso_general_settings', 'country_settings', $additional_params);
29
    }
30
31
32
    /**
33
     * Return the decimal places (precision) radio field locator for selection.
34
     * @param int    $decimal_place_value
35
     * @param string $country_code
36
     * @return string
37
     */
38
    public static function currencyDecimalPlacesRadioField($decimal_place_value = 2, $country_code = 'US')
39
    {
40
        return "//input[@id='CNT_cur_dec_plc-$country_code-$decimal_place_value']";
41
    }
42
43
44
    /**
45
     * Return the currency decimal mark field locator for selection.
46
     * @param string $decimal_mark
47
     * @return string
48
     */
49
    public static function currencyDecimalMarkRadioField($decimal_mark = '.')
50
    {
51
        return "//input[@class='CNT_cur_dec_mrk' and @value='$decimal_mark']";
52
    }
53
54
55
    /**
56
     * Return the currency thousands separator field locator for selection.
57
     * @param string $thousands_separator
58
     * @return string
59
     */
60
    public static function currencyThousandsSeparatorField($thousands_separator = ',')
61
    {
62
        return "//input[@class='CNT_cur_thsnds' and @value='$thousands_separator']";
63
    }
64
}