| @@ 5-17 (lines=13) @@ | ||
| 2 | ||
| 3 | namespace Encore\Admin\Grid\Displayers; |
|
| 4 | ||
| 5 | class Prefix extends AbstractDisplayer |
|
| 6 | { |
|
| 7 | public function display($prefix = null, $delimiter = ' ') |
|
| 8 | { |
|
| 9 | if ($prefix instanceof \Closure) { |
|
| 10 | $prefix = $prefix->call($this->row, $this->getValue()); |
|
| 11 | } |
|
| 12 | ||
| 13 | return <<<HTML |
|
| 14 | {$prefix}{$delimiter}{$this->getValue()} |
|
| 15 | HTML; |
|
| 16 | } |
|
| 17 | } |
|
| 18 | ||
| @@ 5-17 (lines=13) @@ | ||
| 2 | ||
| 3 | namespace Encore\Admin\Grid\Displayers; |
|
| 4 | ||
| 5 | class Suffix extends AbstractDisplayer |
|
| 6 | { |
|
| 7 | public function display($suffix = null, $delimiter = ' ') |
|
| 8 | { |
|
| 9 | if ($suffix instanceof \Closure) { |
|
| 10 | $suffix = $suffix->call($this->row, $this->getValue()); |
|
| 11 | } |
|
| 12 | ||
| 13 | return <<<HTML |
|
| 14 | {$this->getValue()}{$delimiter}{$suffix} |
|
| 15 | HTML; |
|
| 16 | } |
|
| 17 | } |
|
| 18 | ||