These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Encore\Admin\Form\Field; |
||
4 | |||
5 | View Code Duplication | class Icon extends Text |
|
6 | { |
||
7 | protected $default = 'fa-pencil'; |
||
8 | |||
9 | protected static $css = [ |
||
10 | '/vendor/laravel-admin/fontawesome-iconpicker/dist/css/fontawesome-iconpicker.min.css', |
||
11 | ]; |
||
12 | |||
13 | protected static $js = [ |
||
14 | '/vendor/laravel-admin/fontawesome-iconpicker/dist/js/fontawesome-iconpicker.min.js', |
||
15 | ]; |
||
16 | |||
17 | public function render() |
||
18 | { |
||
19 | $this->script = <<<EOT |
||
20 | |||
21 | $('{$this->getElementClassSelector()}').iconpicker({placement:'bottomLeft'}); |
||
22 | |||
23 | EOT; |
||
24 | |||
25 | $this->prepend('<i class="fa fa-pencil fa-fw"></i>') |
||
26 | ->defaultAttribute('style', 'width: 140px'); |
||
27 | |||
28 | return parent::render(); |
||
0 ignored issues
–
show
Bug
Compatibility
introduced
by
Loading history...
|
|||
29 | } |
||
30 | } |
||
31 |