1 | <?php |
||
5 | class LaravelFontAwesome |
||
6 | { |
||
7 | public function icons($version=null) |
||
16 | |||
17 | public function icon($icon, $options = []) |
||
27 | |||
28 | /** |
||
29 | * Strip the default fa- prefix from the icon name if provider. |
||
30 | * |
||
31 | * @param $icon |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | protected function getIcon($icon) |
||
39 | |||
40 | /** |
||
41 | * Get the icon options. If no array is given cast the option to a |
||
42 | * string and assume it is an extra class name. |
||
43 | * |
||
44 | * @param $options |
||
45 | * |
||
46 | * @return array |
||
47 | */ |
||
48 | protected function getOptions($options) |
||
58 | |||
59 | /** |
||
60 | * Gets the list of class names to add to the icon element we are about to generate. |
||
61 | * |
||
62 | * @param $icon |
||
63 | * @param $extraClasses |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | protected function buildIconClasses($icon, $extraClasses) |
||
71 | |||
72 | /** |
||
73 | * Build the attribute list to add to the icon we are about to generate. |
||
74 | * |
||
75 | * @param $options |
||
76 | * @param $classes |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | protected function buildAttributes($options, $classes) |
||
95 | |||
96 | /** |
||
97 | * Build the attribute. |
||
98 | * |
||
99 | * @param $attribute |
||
100 | * @param $value |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | protected function createAttribute($attribute, $value) |
||
108 | |||
109 | /** |
||
110 | * Build the icon with the correct attributes. |
||
111 | * |
||
112 | * @param $attributes |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | protected function buildIcon($attributes) |
||
120 | } |
||
121 |