More Related Content More from Razvan Raducanu, PhD
More from Razvan Raducanu, PhD (20) 3. trimiterea datelor la vederi3. Observam ca avem 2 module care sunt “legate” de pagina
root a aplicatiei.
Aplica va “alege” pagina care o va afisa la adresa:
http://localhost:8080/
in functie de ultimul modul din
/config/autoload/modules.config.php
return [
………………………………..
'Application',
'Test',
'Vederi',
];
In acest caz va incarca pagina root a modulului “Vederi”.
Modificai ordinea modulelor si vizualizati:
http://localhost:8080/
6. Module/Test/config/module.config.php
………………………………….
return [
'router' => [
'routes' => [
'home' => [
'type' => Literal::class,
'options' => [
'route' => '/',
'defaults' => [
'controller' => ControllerIndexController::class,
'action' => 'index',
],
],
],
///////////////////////////////////////////////
'homeee' => [
'type' => Literal::class,
'options' => [
'route' => '/home',
'defaults' => [
'controller' => ControllerHomeController::class,
'action' => 'index',
],
],
], ///////////////////////////////
…………………………………………………………………………………………….
8. …………………………………….
'view_manager' => [
'display_not_found_reason' => true,
'display_exceptions' => true,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => [
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
'test/index/index' => __DIR__ . '/../view/test/index/index.phtml',
‘vederi/home/index' => __DIR__ . '/../view/vederi/home/index.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
],
…………………………….
14. ……………………..
'view_manager' => [
'display_not_found_reason' => true,
'display_exceptions' => true,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => [
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
'vederi/index/index' => __DIR__ . '/../view/vederi/index/index.phtml',
'vederi/home/index' => __DIR__ . '/../view/vederi/home/index.phtml',
'vederi/home/test' => __DIR__ . '/../view/vederi/home/test.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
],
18. ……………………..
'view_manager' => [
'display_not_found_reason' => true,
'display_exceptions' => true,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => [
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
'vederi/index/index' => __DIR__ . '/../view/vederi/index/index.phtml',
'vederi/home/index' => __DIR__ . '/../view/vederi/home/index.phtml',
'vederi/home/test' => __DIR__ . '/../view/vederi/home/test.phtml',
'vederi/home/data' => __DIR__ . '/../view/vederi/home/data.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
],