@@ -10,10 +10,10 @@ |
||
10 | 10 | private $lines = ''; |
11 | 11 | |
12 | 12 | public function set_header(string $header) { |
13 | - $this->header = $header; |
|
14 | - } |
|
13 | + $this->header = $header; |
|
14 | + } |
|
15 | 15 | |
16 | 16 | public function set_lines(string $lines) { |
17 | - $this->lines = $lines; |
|
18 | - } |
|
19 | - } |
|
20 | 17 | \ No newline at end of file |
18 | + $this->lines = $lines; |
|
19 | + } |
|
20 | + } |
|
21 | 21 | \ No newline at end of file |
@@ -4,5 +4,5 @@ |
||
4 | 4 | use phoponent\framework\traits\view; |
5 | 5 | |
6 | 6 | class th extends \phoponent\app\component\core\Table\mvc\view\th { |
7 | - use view; |
|
7 | + use view; |
|
8 | 8 | } |
9 | 9 | \ No newline at end of file |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | use phoponent\framework\loading\Auto; |
6 | 6 | use phoponent\framework\service\translation; |
7 | 7 | |
8 | - class Table extends \phoponent\app\component\core\Table { |
|
8 | + class Table extends \phoponent\app\component\core\Table { |
|
9 | 9 | |
10 | 10 | public static function load_services() |
11 | 11 | { |
@@ -17,35 +17,35 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | /** |
20 | - * @return string |
|
21 | - * @throws Exception |
|
22 | - */ |
|
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')); |
|
20 | + * @return string |
|
21 | + * @throws Exception |
|
22 | + */ |
|
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 | 30 | |
31 | 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 | - ); |
|
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 | 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(); |
|
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 | 49 | |
50 | 50 | return $table; |
51 | 51 | } |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace phoponent\app\component\custom; |
3 | 3 | |
4 | - class Main extends \phoponent\app\component\core\Main { |
|
4 | + class Main extends \phoponent\app\component\core\Main { |
|
5 | 5 | public function render():string { |
6 | - return $this->get_view('Main') |
|
7 | - ->set_vars([ |
|
8 | - 'title' => $this->attribute('title') |
|
9 | - ])->render(); |
|
6 | + return $this->get_view('Main') |
|
7 | + ->set_vars([ |
|
8 | + 'title' => $this->attribute('title') |
|
9 | + ])->render(); |
|
10 | 10 | } |
11 | 11 | } |
12 | 12 | \ No newline at end of file |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace phoponent\app\component\custom; |
3 | 3 | |
4 | - class Mon_component extends \phoponent\app\component\core\Mon_component { |
|
4 | + class Mon_component extends \phoponent\app\component\core\Mon_component { |
|
5 | 5 | public function render():string { |
6 | 6 | $hello_world = $this->get_model('my_Mon_component')->get_hello_world(); |
7 | 7 | $view = $this->get_view('my_Mon_component') |
@@ -35,10 +35,10 @@ |
||
35 | 35 | $content = $this->value; |
36 | 36 | $id = ''; |
37 | 37 | $class = ''; |
38 | - if(!is_null($this->id)) { |
|
38 | + if (!is_null($this->id)) { |
|
39 | 39 | $id = " id='{$this->id}'"; |
40 | 40 | } |
41 | - if(!is_null($this->class)) { |
|
41 | + if (!is_null($this->class)) { |
|
42 | 42 | $class = " class='{$this->class}'"; |
43 | 43 | } |
44 | 44 |
@@ -2,17 +2,17 @@ |
||
2 | 2 | namespace phoponent\app\component\custom; |
3 | 3 | |
4 | 4 | class Mon_premier_tag extends \phoponent\app\component\core\Mon_premier_tag { |
5 | - public function render(): string { |
|
6 | - $model = $this->get_model('props_gestion') |
|
5 | + public function render(): string { |
|
6 | + $model = $this->get_model('props_gestion') |
|
7 | 7 | ->set('id', $this->attribute('id').(!is_null($this->attribute('date')) ? '-'.$this->attribute('date') : '')) |
8 | 8 | ->set('class', $this->attribute('class')) |
9 | 9 | ->set('value', $this->value() !== '' ? $this->value() : __CLASS__); |
10 | - list($class, $id, $content) = $model->get('infos'); |
|
10 | + list($class, $id, $content) = $model->get('infos'); |
|
11 | 11 | |
12 | - return $this->get_view('balise')->set_vars([ |
|
13 | - 'id' => $id, |
|
12 | + return $this->get_view('balise')->set_vars([ |
|
13 | + 'id' => $id, |
|
14 | 14 | 'class' => $class, |
15 | 15 | 'content' => $content, |
16 | 16 | ])->render(); |
17 | - } |
|
17 | + } |
|
18 | 18 | } |
19 | 19 | \ No newline at end of file |
@@ -4,8 +4,8 @@ |
||
4 | 4 | use phoponent\framework\classe\xphp_tag; |
5 | 5 | |
6 | 6 | class Clock extends \phoponent\app\component\core\Clock { |
7 | - public function render(): string { |
|
8 | - $result = $this->get_view('horloge')->render(); |
|
9 | - return $result; |
|
10 | - } |
|
7 | + public function render(): string { |
|
8 | + $result = $this->get_view('horloge')->render(); |
|
9 | + return $result; |
|
10 | + } |
|
11 | 11 | } |
12 | 12 | \ No newline at end of file |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | class Title |
7 | 7 | { |
8 | - use model; |
|
8 | + use model; |
|
9 | 9 | public function get_title($title) { |
10 | 10 | return is_null($title) ? 'Accueil' : $title; |
11 | 11 | } |