From e115875801c2e32399079c4ef92bb11ceb4f2c1d Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 12 Feb 2020 21:05:46 +0100 Subject: generate cytoscape datas --- app/class/Controllerhome.php | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'app/class/Controllerhome.php') diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php index 42ace87..86b2f6f 100644 --- a/app/class/Controllerhome.php +++ b/app/class/Controllerhome.php @@ -86,6 +86,24 @@ class Controllerhome extends Controllerpage } } + /** + * Temporary map display function + */ + public function map() + { + if ($this->user->isadmin()) { + + $pagelist = $this->modelhome->getlister(); + $datas = $this->modelhome->mapdata($pagelist); + + $vars['json'] = json_encode($datas, JSON_PRETTY_PRINT); + + $this->showtemplate('map', $vars); + + } + + } + public function columns() { if (isset($_POST['columns']) && $this->user->iseditor()) { @@ -127,12 +145,7 @@ class Controllerhome extends Controllerpage $this->routedirect('home'); } } - - public function map() - { - - } - + /** * Render every pages in the database */ -- cgit v1.2.3