@@ 95-103 (lines=9) @@ | ||
92 | ||
93 | protected function prepareDataValue($data) |
|
94 | { |
|
95 | if (isset($this->pluginOptions['data-value'])) { |
|
96 | if ($this->pluginOptions['data-value'] instanceof \Closure) { |
|
97 | $result = call_user_func($this->pluginOptions['data-value'], $this, $data); |
|
98 | } else { |
|
99 | $result = $this->pluginOptions['data-value']; |
|
100 | } |
|
101 | } else { |
|
102 | $result = $this->pluginOptions['value']; |
|
103 | } |
|
104 | ||
105 | $this->pluginOptions['data-value'] = $result; |
|
106 | } |
|
@@ 110-118 (lines=9) @@ | ||
107 | ||
108 | protected function prepareDisplayValue($data) |
|
109 | { |
|
110 | if (isset($this->pluginOptions['data-display-value'])) { |
|
111 | if ($this->pluginOptions['data-display-value'] instanceof \Closure) { |
|
112 | $result = call_user_func($this->pluginOptions['data-display-value'], $this, $data); |
|
113 | } else { |
|
114 | $result = $this->pluginOptions['data-display-value']; |
|
115 | } |
|
116 | } else { |
|
117 | $result = $this->pluginOptions['value']; |
|
118 | } |
|
119 | ||
120 | if (is_array($result)) { |
|
121 | if ($this->pluginOptions['source']) { |