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

MultipleSelect   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A display() 0 13 1
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