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

EditLinks::editWithIcon()   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     EditLinks
5
 *
6
 * @package  Arcanesoft\Core\Helpers\UI\LinkTraits
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
trait EditLinks
10
{
11
    /**
12
     * Generate edit icon link.
13
     *
14
     * @param  string  $url
15
     * @param  array   $attributes
16
     * @param  bool    $disabled
17
     *
18
     * @return self
19
     */
20 9
    public static function editIcon($url, array $attributes = [], $disabled = false)
21
    {
22 9
        return self::make('edit', $url, $attributes, $disabled)
23 9
                   ->size('xs')
24 9
                   ->withTitle(false);
25
    }
26
27
    /**
28
     * Generate edit link with icon.
29
     *
30
     * @param  string  $url
31
     * @param  array   $attributes
32
     * @param  bool    $disabled
33
     *
34
     * @return self
35
     */
36 3
    public static function editWithIcon($url, array $attributes = [], $disabled = false)
37
    {
38 3
        return self::make('edit', $url, $attributes, $disabled)
39 3
                   ->size('sm')
40 3
                   ->tooltip(false);
41
    }
42
}
43