diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-11-02 02:03:52 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-11-02 02:03:52 +0100 |
commit | 85824de70ded75c98bd50220160e2171fdc8df41 (patch) | |
tree | 11480f65ff97ddbb3ea4806ff1f313628ced15a0 /w/class/modeldb.php | |
parent | 36ef34af2abcdea63a73b578208f20ca40b52f49 (diff) | |
download | wcms-85824de70ded75c98bd50220160e2171fdc8df41.tar.gz wcms-85824de70ded75c98bd50220160e2171fdc8df41.zip |
render working and url auto link
Diffstat (limited to 'w/class/modeldb.php')
-rw-r--r-- | w/class/modeldb.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/w/class/modeldb.php b/w/class/modeldb.php index d6a4c18..0d4e630 100644 --- a/w/class/modeldb.php +++ b/w/class/modeldb.php @@ -20,5 +20,30 @@ class Modeldb extends Model $this->artstore = new \JamesMoss\Flywheel\Repository(Config::arttable(), $this->database); } + + public function getlister() + { + $artlist = []; + $list = $this->artstore->findAll(); + foreach ($list as $artdata) { + $artlist[$artdata->id] = new Art2($artdata); + } + return $artlist; + } + + public function getlisterid(array $idlist = []) + { + $artdatalist = $this->artstore->query() + ->where('__id', 'IN', $idlist) + ->execute(); + + $artlist = []; + foreach ($artdatalist as $id => $artdata) { + $artlist[$id] = new Art2($artdata); + } + return $artlist; + } + + } |