-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublic.php
41 lines (37 loc) · 1.08 KB
/
public.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
require_once('db.php');
class plugins_homeblock_public extends plugins_homeblock_db {
/**
* @var frontend_model_template $template
* @var frontend_model_data $data
*/
protected frontend_model_template $template;
protected frontend_model_data $data;
public string $lang;
/**
* @access public
* Constructor
*/
public function __construct() {
$this->template = new frontend_model_template();
$this->data = new frontend_model_data($this);
$this->lang = $this->template->lang;
}
/**
* Assign data to the defined variable or return the data
* @param string $type
* @param array|int|null $id
* @param string|null $context
* @param boolean|string $assign
* @return mixed
*/
private function getItems(string $type, $id = null, ?string $context = null, $assign = true) {
return $this->data->getItems($type, $id, $context, $assign);
}
/**
* @return array|bool
*/
public function getContent() {
return $this->getItems('page',['lang' => $this->lang],'one');
}
}