1 | <?php |
||
17 | class MessageTopicIcons extends ElkArte\ValuesContainer |
||
18 | { |
||
19 | const IMAGE_URL = 'images_url'; |
||
20 | const DEFAULT_URL = 'default_images_url'; |
||
21 | |||
22 | /** |
||
23 | * Whether to check if the icon exists in the expected location |
||
24 | * @var bool |
||
25 | */ |
||
26 | protected $_check = false; |
||
27 | |||
28 | /** |
||
29 | * Theme directory path |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $_theme_dir = ''; |
||
33 | |||
34 | /** |
||
35 | * Default icon code |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $_default_icon = 'xx'; |
||
39 | |||
40 | /** |
||
41 | * Icons that are default with ElkArte |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $_stable_icons = array(); |
||
45 | |||
46 | /** |
||
47 | * Icons to load in addition to the default |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $_custom_icons = array(); |
||
51 | |||
52 | /** |
||
53 | * This simple function returns the message topic icon array. |
||
54 | * |
||
55 | * @param bool|false $icon_check |
||
56 | * @param string $theme_dir |
||
57 | * @param array topic icons to load in addition to default |
||
58 | * @param string $default |
||
59 | */ |
||
60 | 1 | public function __construct($icon_check = false, $theme_dir = '', $custom = array(), $default = 'xx') |
|
81 | |||
82 | /** |
||
83 | * Return the icon specified by idx, or the default icon for invalid names |
||
84 | * |
||
85 | * @param int|string $idx |
||
86 | * @return string |
||
87 | */ |
||
88 | 1 | public function __get($idx) |
|
98 | |||
99 | /** |
||
100 | * Load the stable icon array |
||
101 | */ |
||
102 | 1 | protected function _loadStableIcons() |
|
125 | |||
126 | /** |
||
127 | * This simple function returns the message topic icon array. |
||
128 | */ |
||
129 | 1 | protected function _loadIcons() |
|
140 | |||
141 | /** |
||
142 | * Set the icon URL location |
||
143 | * |
||
144 | * @param string $icon |
||
145 | */ |
||
146 | 1 | protected function _setUrl($icon) |
|
161 | } |