summaryrefslogtreecommitdiff
path: root/lib/Minz/View.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-26 14:50:33 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-26 14:50:33 +0200
commitf0fb1fbb07347d3a2fd7b853bff1f91807cd2d89 (patch)
tree4566beb83704d5b2bbcb128749da042cdaa4e619 /lib/Minz/View.php
parent94ad9cf073962d9ff8076ef8e0db35e513d565a7 (diff)
parentc14162221365077bcaeecde7127806190490dd58 (diff)
Merge branch 'dev' into beta
Diffstat (limited to 'lib/Minz/View.php')
-rw-r--r--lib/Minz/View.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/Minz/View.php b/lib/Minz/View.php
index f034ab10b..a0dec1824 100644
--- a/lib/Minz/View.php
+++ b/lib/Minz/View.php
@@ -26,12 +26,19 @@ class Minz_View {
* Détermine si on utilise un layout ou non
*/
public function __construct () {
+ $this->change_view(Minz_Request::controllerName(),
+ Minz_Request::actionName());
+ self::$title = Minz_Configuration::title ();
+ }
+
+ /**
+ * Change le fichier de vue en fonction d'un controller / action
+ */
+ public function change_view($controller_name, $action_name) {
$this->view_filename = APP_PATH
. self::VIEWS_PATH_NAME . '/'
- . Minz_Request::controllerName () . '/'
- . Minz_Request::actionName () . '.phtml';
-
- self::$title = Minz_Configuration::title ();
+ . $controller_name . '/'
+ . $action_name . '.phtml';
}
/**