aboutsummaryrefslogtreecommitdiff
path: root/src/installation.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/installation.php')
-rw-r--r--src/installation.php46
1 files changed, 13 insertions, 33 deletions
diff --git a/src/installation.php b/src/installation.php
index 7fff5f7..df0f851 100644
--- a/src/installation.php
+++ b/src/installation.php
@@ -100,21 +100,16 @@ function makeStartPage(EntityManager $entityManager){
100 100
101 /* -- table node -- */ 101 /* -- table node -- */
102 // paramètres: name_node, article_timestamp, attributes, position, parent, page, article 102 // paramètres: name_node, article_timestamp, attributes, position, parent, page, article
103 $head_accueil = new Node('head', ['css_array' => ['body', 'head', 'nav', 'foot'], 'js_array' => ['main']], 1, NULL, $accueil, NULL); 103 $head = new Node('head', 1, NULL, NULL, NULL);
104 $head_article = new Node('head', ['css_array' => ['body', 'head', 'nav', 'foot'], 'js_array' => ['main']], 1, NULL, $article, NULL); 104 $header = new Node('header', 2, NULL, NULL, NULL);
105 $header = new Node('header', [], 2, NULL, NULL, NULL); 105 $nav = new Node('nav', 1, $header, NULL, NULL);
106 $nav = new Node('nav', [], 1, $header, NULL, NULL); 106 $main = new Node('main', 3, NULL, NULL, NULL);
107 $main = new Node('main', [], 3, NULL, NULL, NULL); 107 $footer = new Node('footer', 4, NULL, NULL, NULL);
108 $footer = new Node('footer', [], 4, NULL, NULL, NULL); 108 $breadcrumb = new Node('breadcrumb', 2, $header, NULL, NULL);
109 $breadcrumb = new Node('breadcrumb', [], 2, $header, NULL, NULL); 109 $login = new Node('login', 1, $main, $connection, NULL);
110 $head_login = new Node('head', ["stop" => true, 'css_array' => ['body'], 'js_array' => ['main']], 1, NULL, $connection, NULL); 110 $user_edit = new Node('user_edit', 1, $main, $my_account, NULL);
111 $login = new Node('login', [], 1, $main, $connection, NULL); 111 $bloc_edit_menu = new Node('menu', 1, $main, $menu_paths, NULL);
112 $head_my_account = new Node('head', ["stop" => true, 'css_array' => ['body'], 'js_array' => ['main']], 1, NULL, $my_account, NULL); 112 $bloc_new_page = new Node('new_page', 1, $main, $new_page, NULL);
113 $user_edit = new Node('user_edit', [], 1, $main, $my_account, NULL);
114 $head_edit_menu = new Node('head', ['css_array' => ['body', 'head', 'nav', 'menu', 'foot'], 'js_array' => ['main', 'menu']], 1, NULL, $menu_paths, NULL);
115 $bloc_edit_menu = new Node('menu', [], 1, $main, $menu_paths, NULL);
116 $head_new_page = new Node('head', ['css_array' => ['body', 'head', 'nav', 'new_page', 'foot'], 'js_array' => ['main', 'new_page']], 1, NULL, $new_page, NULL);
117 $bloc_new_page = new Node('new_page', [], 1, $main, $new_page, NULL);
118 113
119 /* -- table asset -- */ 114 /* -- table asset -- */
120 // paramètres: file_name, file_path, file_path_mini, mime_type, alt 115 // paramètres: file_name, file_path, file_path_mini, mime_type, alt
@@ -128,12 +123,7 @@ function makeStartPage(EntityManager $entityManager){
128 123
129 /* -- table node_data -- */ 124 /* -- table node_data -- */
130 // paramètres: data, node, images 125 // paramètres: data, node, images
131 $head_accueil_data = new NodeData([], $head_accueil, new ArrayCollection([$favicon])); 126 $head_data = new NodeData([], $head, new ArrayCollection([$favicon]));
132 $head_login_data = new NodeData([], $head_login, new ArrayCollection([$favicon]));
133 $head_my_account_data = new NodeData([], $head_my_account, new ArrayCollection([$favicon]));
134 $head_article_data = new NodeData([], $head_article, new ArrayCollection([$favicon]));
135 $head_edit_menu_data = new NodeData([], $head_edit_menu, new ArrayCollection([$favicon]));
136 $head_new_page_data = new NodeData([], $head_new_page, new ArrayCollection([$favicon]));
137 $header_data = new NodeData(["title" => "Titre", "description" => "Sous-titre", "header_logo" => "assets/logo-nb-et-ffn.png", "header_background" => "assets/fond-piscine.jpg", 127 $header_data = new NodeData(["title" => "Titre", "description" => "Sous-titre", "header_logo" => "assets/logo-nb-et-ffn.png", "header_background" => "assets/fond-piscine.jpg",
138 "social" => ["facebook" => "https://www.facebook.com", "instagram" => "https://www.instagram.com", "linkedin" => "https://www.linkedin.com"]], 128 "social" => ["facebook" => "https://www.facebook.com", "instagram" => "https://www.instagram.com", "linkedin" => "https://www.linkedin.com"]],
139 $header, new ArrayCollection([$facebook, $instagram, $linkedin, $github])); 129 $header, new ArrayCollection([$facebook, $instagram, $linkedin, $github]));
@@ -149,20 +139,15 @@ function makeStartPage(EntityManager $entityManager){
149 $entityManager->persist($new_page); 139 $entityManager->persist($new_page);
150 140
151 /* -- table node -- */ 141 /* -- table node -- */
152 $entityManager->persist($head_accueil); 142 $entityManager->persist($head);
153 $entityManager->persist($header); 143 $entityManager->persist($header);
154 $entityManager->persist($nav); 144 $entityManager->persist($nav);
155 $entityManager->persist($main); 145 $entityManager->persist($main);
156 $entityManager->persist($footer); 146 $entityManager->persist($footer);
157 $entityManager->persist($breadcrumb); 147 $entityManager->persist($breadcrumb);
158 $entityManager->persist($head_login);
159 $entityManager->persist($login); 148 $entityManager->persist($login);
160 $entityManager->persist($head_my_account);
161 $entityManager->persist($user_edit); 149 $entityManager->persist($user_edit);
162 $entityManager->persist($head_article);
163 $entityManager->persist($head_edit_menu);
164 $entityManager->persist($bloc_edit_menu); 150 $entityManager->persist($bloc_edit_menu);
165 $entityManager->persist($head_new_page);
166 $entityManager->persist($bloc_new_page); 151 $entityManager->persist($bloc_new_page);
167 152
168 /* -- table image -- */ 153 /* -- table image -- */
@@ -173,14 +158,9 @@ function makeStartPage(EntityManager $entityManager){
173 $entityManager->persist($github); 158 $entityManager->persist($github);
174 159
175 /* -- table node_data -- */ 160 /* -- table node_data -- */
176 $entityManager->persist($head_accueil_data); 161 $entityManager->persist($head_data);
177 $entityManager->persist($header_data); 162 $entityManager->persist($header_data);
178 $entityManager->persist($footer_data); 163 $entityManager->persist($footer_data);
179 $entityManager->persist($head_login_data);
180 $entityManager->persist($head_my_account_data);
181 $entityManager->persist($head_article_data);
182 $entityManager->persist($head_edit_menu_data);
183 $entityManager->persist($head_new_page_data);
184 164
185 $entityManager->flush(); 165 $entityManager->flush();
186 header('Location: ' . new URL); 166 header('Location: ' . new URL);