diff --git a/application/class/Controlleur.php b/application/class/Controlleur.php index 8d45fbf..11bfbfd 100644 --- a/application/class/Controlleur.php +++ b/application/class/Controlleur.php @@ -28,7 +28,7 @@ class Controlleur $conduitRoute = "\\" . $conduit[0]; $method = strtolower($conduit[1]); $class = new $conduitRoute(); - $class->initialize($application->route); + $class->initialize($application); $this->vue = new VueVide(); $this->vue->ecran = $class->$method(); } elseif ($application->url->page['control']) { diff --git a/application/class/Implement/Conduit.php b/application/class/Implement/Conduit.php index 165c471..8a8ea25 100644 --- a/application/class/Implement/Conduit.php +++ b/application/class/Implement/Conduit.php @@ -5,10 +5,15 @@ namespace MVC\Classe\Implement; class Conduit extends Action { - public function initialize($var) + public function initialize($application) { + + //extract($application->modele->page); + foreach ($application->url->page as $key => $value) { + $this->templateData[$key] = $value; + } //Export variable from conduit - foreach ($var as $key => $value) { + foreach ($application->route as $key => $value) { if ($key != "controller") { if ($key != "_route") { $this->$key = $value; diff --git a/application/config/files/routing.yml b/application/config/files/routing.yml index c54412d..08255bb 100644 --- a/application/config/files/routing.yml +++ b/application/config/files/routing.yml @@ -11,3 +11,11 @@ foo_placeholder_route: defaults: { controller: 'FooConduit::load' } requirements: id: '[0-9]+' + +docs_route: + path: /docs + defaults: { controller: 'DocConduit::index' } + +docs_name_route: + path: /docs/file/{file} + defaults: { controller: 'DocConduit::readfile' } diff --git a/application/include/actions/MenudocsAction.php b/application/include/actions/MenudocsAction.php new file mode 100644 index 0000000..1637f28 --- /dev/null +++ b/application/include/actions/MenudocsAction.php @@ -0,0 +1,32 @@ +render('menu-docs', array('files' => $files)); + } + +} diff --git a/application/include/conduits/DocConduit.php b/application/include/conduits/DocConduit.php new file mode 100644 index 0000000..a77e0db --- /dev/null +++ b/application/include/conduits/DocConduit.php @@ -0,0 +1,51 @@ +templateData['page_title'] = 'Foo'; + $this->templateData['description'] = 'DocConduit'; + $this->templateData['files'] = $files; + + return $this->render('docs', $this->templateData); + } + + // Route('/docs/file/{file}') + public function readfile() + { + + $markdown = file_get_contents(DATA_PATH . '/docs/' . $this->file); + + $my_html = MarkdownExtra::defaultTransform($markdown); + + $this->templateData['page_title'] = 'Foo'; + $this->templateData['description'] = 'DocConduit'; + $this->templateData['data'] = $my_html; + + return $this->render('docs', $this->templateData); + + } +} diff --git a/application/include/controlleurs/beers.php b/application/include/controlleurs/beers.php new file mode 100644 index 0000000..d49a8be --- /dev/null +++ b/application/include/controlleurs/beers.php @@ -0,0 +1,7 @@ + 'blade', "templating_b" => 'twig', "templating_c" => 'edge'); +Logger::addLog('ok', 'Hello world'); \ No newline at end of file diff --git a/application/include/modeles/beers.model b/application/include/modeles/beers.model new file mode 100644 index 0000000..e4f701c --- /dev/null +++ b/application/include/modeles/beers.model @@ -0,0 +1,5 @@ +name : beers +page_title : module_title +description : module_description +params : module_params + diff --git a/application/include/vues/layout/body.blade.php b/application/include/vues/layout/body.blade.php index 8f95d97..8632adf 100644 --- a/application/include/vues/layout/body.blade.php +++ b/application/include/vues/layout/body.blade.php @@ -10,6 +10,8 @@
@@ -37,7 +39,7 @@This is appended to the master sidebar.
+@endsection + +@section('content') ++ SAND FrameWork is an CC Universal-licensed open source project and completely free to use. +
++ However, the amount of effort needed to maintain and develop new features for the project is not + sustainable + without proper financial backing. + You can support its ongoing development by being a backer or a sponsor on + Patreon campaign + (recurring, with perks for different tiers), and get your company logo here. +
++ Also, you can make a one time donation via PayPal. +
+