| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class PageItemDisplay extends Component |
||
| 10 | { |
||
| 11 | public $link; |
||
| 12 | public $id = ''; |
||
| 13 | /** |
||
| 14 | * Create a new component instance. |
||
| 15 | * |
||
| 16 | * @return void |
||
| 17 | */ |
||
| 18 | public function __construct($link) |
||
| 19 | { |
||
| 20 | // $this->title = $title; |
||
| 21 | $this->link = $link; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Get the view / contents that represent the component. |
||
| 26 | * |
||
| 27 | * @return \Illuminate\Contracts\View\View|\Closure|string |
||
| 28 | */ |
||
| 29 | public function render() |
||
| 30 | { |
||
| 31 | |||
| 32 | $params = json_decode($this->link->type_params); |
||
| 33 | |||
| 34 | |||
| 35 | |||
| 36 | return view('components.pageitems.'.$this->link->typename.'-display', ['link' => $this->link, 'params' => $params]); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getModalIdString(): string |
||
| 46 | } |
||
| 47 | } |
||
| 48 |