Completed
Push — master ( 4fa96a...ba6212 )
by ARCANEDEV
03:18
created

DeleteLinks::deleteModalIcon()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php namespace Arcanesoft\Core\Helpers\UI\LinkTraits;
2
3
/**
4
 * Trait     DeleteLinks
5
 *
6
 * @package  Arcanesoft\Core\Helpers\UI\LinkTraits
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
trait DeleteLinks
10
{
11
    /**
12
     * Generate delete icon link for modals.
13
     *
14
     * @param  string  $url
15
     * @param  array   $attributes
16
     * @param  bool    $disabled
17
     *
18
     * @return self
19
     */
20 9
    public static function deleteModalIcon($url, array $attributes = [], $disabled = false)
21
    {
22 9
        return self::make('delete', $url, $attributes, $disabled)
23 9
                   ->size('xs')
24 9
                   ->withTitle(false);
25
    }
26
27
    /**
28
     * Generate delete link with icon for modals.
29
     *
30
     * @param  string  $url
31
     * @param  array   $attributes
32
     * @param  bool    $disabled
33
     *
34
     * @return self
35
     */
36 3
    public static function deleteModalWithIcon($url, array $attributes = [], $disabled = false)
37
    {
38 3
        return static::make('delete', $url, $attributes, $disabled)
39 3
                     ->size('sm')
40 3
                     ->withTitle(true)
41 3
                     ->tooltip(false);
42
    }
43
}
44