| Conditions | 1 |
| Paths | 1 |
| Total Lines | 28 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function render():string { |
||
| 24 | /** |
||
| 25 | * @var \phoponent\app\component\custom\Table\mvc\model\table $model |
||
| 26 | */ |
||
| 27 | $model = $this->get_model('table'); |
||
| 28 | $my_name = 'Nicolas'; |
||
| 29 | $json_datas = $model->get_datas_from_json($this->attribute('file')); |
||
| 30 | |||
| 31 | |||
| 32 | $header_view = $model->genere_header( |
||
| 33 | $json_datas, |
||
| 34 | $this->get_view('tr'), |
||
| 35 | $this->get_view('th') |
||
| 36 | ); |
||
| 37 | $lines = $model->genere_body( |
||
| 38 | $json_datas, |
||
| 39 | $this->get_view('tr'), |
||
| 40 | $this->get_view('td') |
||
| 41 | ); |
||
| 42 | $table = $this->get_view('table') |
||
| 43 | ->set_vars([ |
||
| 44 | 'text_in_french' => translation::__($this->attribute('text_to_translate'), [$my_name], 'fr'), |
||
| 45 | 'text_in_english' => translation::__($this->attribute('text_to_translate'), [$my_name]), |
||
| 46 | 'header' => $header_view, |
||
| 47 | 'lines' => $lines |
||
| 48 | ])->render(); |
||
| 49 | |||
| 50 | return $table; |
||
| 51 | } |
||
| 52 | } |