diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-26 21:43:02 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-26 21:43:02 +0300 |
| commit | 546daa78721e6abdbc89afcecc158118c2239865 (patch) | |
| tree | ae68219fb5ab69fd45d615cf059cc5d0ea279355 /public/app/models/cms/Course_model.php | |
| parent | 9cb35f2bf2127cc8ac077aae17514a57e576217d (diff) | |
| download | classroom-546daa78721e6abdbc89afcecc158118c2239865.tar.gz classroom-546daa78721e6abdbc89afcecc158118c2239865.tar.bz2 classroom-546daa78721e6abdbc89afcecc158118c2239865.zip | |
alfa.3 version; backend designer and front-end embeder enabled
Diffstat (limited to 'public/app/models/cms/Course_model.php')
| -rw-r--r-- | public/app/models/cms/Course_model.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/public/app/models/cms/Course_model.php b/public/app/models/cms/Course_model.php index 54f49cf..6614993 100644 --- a/public/app/models/cms/Course_model.php +++ b/public/app/models/cms/Course_model.php @@ -288,5 +288,27 @@ class Course_model { } + /** pages + * + * return all pages as array; + * array key of each item shall be the page-id + * + * @param void + * @return array + */ + public static function pages() + { + $result = []; + $pages = Registry::use('database')->runQuery("SELECT * FROM page", []); + foreach($pages as $key => $page) { + $result[ $page['id'] ] = [ + 'title' => $page['title'], + 'body' => $page['body'], + 'status' => $page['status'] + ]; + } + // print_r($result); die(); + return $result; + } } |
