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
This commit is contained in:
2014-09-19 07:25:29 +00:00
parent 3602924fbb
commit a09ce0f6c3

View File

@@ -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)