From a09ce0f6c3e84855e61ef97a2422dc3f2bc501fd Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Fri, 19 Sep 2014 07:25:29 +0000 Subject: [PATCH] outputhtml : permit to get the information to display from the view in array mode (wait for a title and a content). git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1831 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- outputhtml.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/outputhtml.php b/outputhtml.php index 02842fc..55f5984 100644 --- a/outputhtml.php +++ b/outputhtml.php @@ -36,6 +36,16 @@ class outputhtml extends output require_once ("views/$viewClass.php"); $obj = new $viewClass; $resView = $obj->$viewMethod ($data, $variable); + if (is_array ($resView)) + { + if (isset ($resView["title"])) + $title = $resView["title"]; + if (! isset ($resView["content"])) + throw new Exception ( + _("No data provided from view $viewClass::$viewMethod"), + 500); + $resView = $resView["content"]; + } } if ($layout !== FALSE)