1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Webfactor\Laravel\Backpack\FluentSyntax\Fields; |
4
|
|
|
|
5
|
|
|
use Webfactor\Laravel\Backpack\FluentSyntax\Contracts\CrudFieldAbstract; |
6
|
|
|
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Defaultable; |
7
|
|
|
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Hintable; |
8
|
|
|
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Prefixable; |
9
|
|
|
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Suffixable; |
10
|
|
|
|
11
|
|
|
class IconPickerField extends CrudFieldAbstract |
12
|
|
|
{ |
13
|
|
|
use Hintable, Defaultable; |
14
|
|
|
|
15
|
|
|
protected $type = 'icon_picker'; |
16
|
|
|
|
17
|
|
|
public function iconset(string $iconset) |
18
|
|
|
{ |
19
|
|
|
$this->options['iconset'] = $iconset; |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
public function fontawesome() |
23
|
|
|
{ |
24
|
|
|
$this->iconset('fontawesome'); |
25
|
|
|
|
26
|
|
|
return $this; |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
public function glyphicon() |
30
|
|
|
{ |
31
|
|
|
$this->iconset('glyphicon'); |
32
|
|
|
|
33
|
|
|
return $this; |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
public function ionicon() |
37
|
|
|
{ |
38
|
|
|
$this->iconset('ionicon'); |
39
|
|
|
|
40
|
|
|
return $this; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
public function weathericon() |
44
|
|
|
{ |
45
|
|
|
$this->iconset('weathericon'); |
46
|
|
|
|
47
|
|
|
return $this; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
public function mapicon() |
51
|
|
|
{ |
52
|
|
|
$this->iconset('mapicon'); |
53
|
|
|
|
54
|
|
|
return $this; |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
public function octicon() |
58
|
|
|
{ |
59
|
|
|
$this->iconset('octicon'); |
60
|
|
|
|
61
|
|
|
return $this; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
public function typicon() |
65
|
|
|
{ |
66
|
|
|
$this->iconset('typicon'); |
67
|
|
|
|
68
|
|
|
return $this; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
public function elusiveicon() |
72
|
|
|
{ |
73
|
|
|
$this->iconset('elusiveicon'); |
74
|
|
|
|
75
|
|
|
return $this; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
public function materialdesign() |
79
|
|
|
{ |
80
|
|
|
$this->iconset('materialdesign'); |
81
|
|
|
|
82
|
|
|
return $this; |
83
|
|
|
} |
84
|
|
|
} |
85
|
|
|
|