Completed
Push — master ( 8136d6...4fa96a )
by ARCANEDEV
03:06
created

helpers.php ➔ link_delete_modal_icon()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Arcanesoft\Core\Helpers\UI\Label;
4
use Arcanesoft\Core\Helpers\UI\Link;
5
6
/* -----------------------------------------------------------------
7
 |  Labels
8
 | -----------------------------------------------------------------
9
 */
10
11
if ( ! function_exists('label_active_icon')) {
12
    /**
13
     * Generate active icon label.
14
     *
15
     * @param  bool   $active
16
     * @param  array  $options
17
     * @param  bool   $withTooltip
18
     *
19
     * @return \Illuminate\Support\HtmlString
20
     */
21
    function label_active_icon($active, array $options = [], $withTooltip = true) {
22
        return Label::activeIcon($active, $options, $withTooltip);
23
    }
24
}
25
26
if ( ! function_exists('label_active_status')) {
27
    /**
28
     * Generate active status label.
29
     *
30
     * @param  bool   $active
31
     * @param  array  $options
32
     * @param  bool   $withIcon
33
     *
34
     * @return \Illuminate\Support\HtmlString
35
     */
36
    function label_active_status($active, array $options = [], $withIcon = true) {
37
        return Label::activeStatus($active, $options, $withIcon);
38
    }
39
}
40
41
if ( ! function_exists('label_count')) {
42
    /**
43
     * Generate count label.
44
     *
45
     * @param  int|float  $count
46
     * @param  array      $options
47
     *
48
     * @return Illuminate\Support\HtmlString
49
     */
50
    function label_count($count, array $options = []) {
51
        return Label::count($count, $options);
52
    }
53
}
54
55
if ( ! function_exists('label_locked_icon')) {
56
    /**
57
     * Generate locked icon label.
58
     *
59
     * @param  bool   $locked
60
     * @param  array  $options
61
     * @param  bool   $withTooltip
62
     *
63
     * @return \Illuminate\Support\HtmlString
64
     */
65
    function label_locked_icon($locked, array $options = [], $withTooltip = true) {
66
        return Label::lockedIcon($locked, $options, $withTooltip);
67
    }
68
}
69
70
if ( ! function_exists('label_locked_status')) {
71
    /**
72
     * Generate locked status label.
73
     *
74
     * @param  bool   $locked
75
     * @param  array  $options
76
     * @param  bool   $withIcon
77
     *
78
     * @return \Illuminate\Support\HtmlString
79
     */
80
    function label_locked_status($locked, array $options = [], $withIcon = true) {
81
        return Label::lockedStatus($locked, $options, $withIcon);
82
    }
83
}
84
85
if ( ! function_exists('label_trashed_status')) {
86
    /**
87
     * Generate trashed status label.
88
     *
89
     * @param  array  $options
90
     * @param  bool   $withIcon
91
     *
92
     * @return \Illuminate\Support\HtmlString
93
     */
94
    function label_trashed_status(array $options = [], $withIcon = true) {
95
        return Label::trashedStatus($options, $withIcon);
96
    }
97
}
98
99
/* -----------------------------------------------------------------
100
 |  Links
101
 | -----------------------------------------------------------------
102
 */
103
104
if ( ! function_exists('link_activate_icon')) {
105
    /**
106
     * Generate activate icon link.
107
     *
108
     * @param  bool    $active
109
     * @param  string  $url
110
     * @param  array   $attributes
111
     * @param  bool    $disabled
112
     *
113
     * @return Link
114
     */
115
    function link_activate_icon($active, $url, array $attributes = [], $disabled = false) {
116
        return Link::activateIcon($active, $url, $attributes, $disabled);
117
    }
118
}
119
120
if ( ! function_exists('link_activate_modal_icon')) {
121
    /**
122
     * Generate activate icon link for modals (reverse button based on active state).
123
     *
124
     * @param  bool    $active
125
     * @param  string  $url
126
     * @param  array   $attributes
127
     * @param  bool    $disabled
128
     *
129
     * @return Link
130
     */
131
    function link_activate_modal_icon($active, $url, array $attributes = [], $disabled = false) {
132
        return Link::activateModalIcon($active, $url, $attributes, $disabled);
133
    }
134
}
135
136
if ( ! function_exists('link_add_icon')) {
137
    /**
138
     * Generate add icon link.
139
     *
140
     * @param  string  $url
141
     * @param  array   $attributes
142
     * @param  bool    $disabled
143
     *
144
     * @return Link
145
     */
146
    function link_add_icon($url, array $attributes = [], $disabled = false) {
147
        return Link::addIcon($url, $attributes, $disabled);
148
    }
149
}
150
151
if ( ! function_exists('link_delete_modal_icon')) {
152
    /**
153
     * Generate delete icon link for modals.
154
     *
155
     * @param  string  $url
156
     * @param  array   $attributes
157
     * @param  bool    $disabled
158
     *
159
     * @return Link
160
     */
161
    function link_delete_modal_icon($url, array $attributes = [], $disabled = false) {
162
        return Link::deleteModalIcon($url, $attributes, $disabled);
163
    }
164
}
165
166
if ( ! function_exists('link_delete_modal_with_icon')) {
167
    /**
168
     * Generate delete link with icon for modals.
169
     *
170
     * @param  string  $url
171
     * @param  array   $attributes
172
     * @param  bool    $disabled
173
     *
174
     * @return Link
175
     */
176
    function link_delete_modal_with_icon($url, array $attributes = [], $disabled = false) {
177
        return Link::deleteModalWithIcon($url, $attributes, $disabled);
178
    }
179
}
180
181
if ( ! function_exists('link_activate_modal_with_icon')) {
182
    /**
183
     * Generate activate link with icon for modals (reverse button based on active state).
184
     *
185
     * @param  bool    $active
186
     * @param  string  $url
187
     * @param  array   $attributes
188
     * @param  bool    $disabled
189
     *
190
     * @return Link
191
     */
192
    function link_activate_modal_with_icon($active, $url, array $attributes = [], $disabled = false) {
193
        return Link::activateModalWithIcon($active, $url, $attributes, $disabled);
194
    }
195
}
196
197
if ( ! function_exists('link_detach_modal_icon')) {
198
    /**
199
     * Generate detach icon link for modals.
200
     *
201
     * @param  string  $url
202
     * @param  array   $attributes
203
     * @param  bool    $disabled
204
     *
205
     * @return Link
206
     */
207
    function link_detach_modal_icon($url, array $attributes = [], $disabled = false) {
208
        return Link::detachModalIcon($url, $attributes, $disabled);
209
    }
210
}
211
212
if ( ! function_exists('link_edit_icon')) {
213
    /**
214
     * Generate edit icon link.
215
     *
216
     * @param  string  $url
217
     * @param  array   $attributes
218
     * @param  bool    $disabled
219
     *
220
     * @return Link
221
     */
222
    function link_edit_icon($url, array $attributes = [], $disabled = false) {
223
        return Link::editIcon($url, $attributes, $disabled);
224
    }
225
}
226
227
if ( ! function_exists('link_edit_with_icon')) {
228
    /**
229
     * Generate edit link with icon.
230
     *
231
     * @param  string  $url
232
     * @param  array   $attributes
233
     * @param  bool    $disabled
234
     *
235
     * @return Link
236
     */
237
    function link_edit_with_icon($url, array $attributes = [], $disabled = false) {
238
        return Link::editWithIcon($url, $attributes, $disabled);
239
    }
240
}
241
242
if ( ! function_exists('link_restore_modal_icon')) {
243
    /**
244
     * Generate restore icon link for modals.
245
     *
246
     * @param  string  $url
247
     * @param  array   $attributes
248
     * @param  bool    $disabled
249
     *
250
     * @return Link
251
     */
252
    function link_restore_modal_icon($url, array $attributes = [], $disabled = false) {
253
        return Link::restoreModalIcon($url, $attributes, $disabled);
254
    }
255
}
256
257
if ( ! function_exists('link_restore_modal_with_icon')) {
258
    /**
259
     * Generate restore link with icon for modals.
260
     *
261
     * @param  string  $url
262
     * @param  array   $attributes
263
     * @param  bool    $disabled
264
     *
265
     * @return Link
266
     */
267
    function link_restore_modal_with_icon($url, array $attributes = [], $disabled = false) {
268
        return Link::restoreModalWithIcon($url, $attributes, $disabled);
269
    }
270
}
271
272
if ( ! function_exists('link_show_icon')) {
273
    /**
274
     * Generate show icon link.
275
     *
276
     * @param  string  $url
277
     * @param  array   $attributes
278
     * @param  bool    $disabled
279
     *
280
     * @return Link
281
     */
282
    function link_show_icon($url, array $attributes = [], $disabled = false) {
283
        return Link::showIcon($url, $attributes, $disabled);
284
    }
285
}
286