Completed
Push — master ( 88ab05...dae06d )
by Song
02:49
created

MultipleSelect::display()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
1
<?php
2
3
namespace Encore\Admin\Grid\Displayers;
4
5
use Encore\Admin\Admin;
6
use Illuminate\Contracts\Support\Arrayable;
7
use Illuminate\Support\Arr;
8
9
class MultipleSelect extends AbstractDisplayer
10
{
11
    public function display($options = [])
12
    {
13
        return Admin::component('admin::grid.inline-edit.multiple-select', [
14
            'key'      => $this->getKey(),
15
            'name'     => $this->getPayloadName(),
16
            'value'    => json_encode($this->getValue()),
17
            'resource' => $this->getResource(),
18
            'trigger'  => "ie-trigger-{$this->getClassName()}",
19
            'target'   => "ie-content-{$this->getClassName()}-{$this->getKey()}",
20
            'display'  => implode(';', Arr::only($options, $this->getValue())),
21
            'options'  => $options,
22
        ]);
23
    }
24
}
25