36 lines
1.4 KiB
PHP
36 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace app\widgets;
|
|
|
|
use yii\base\Widget;
|
|
|
|
class ConfigTree extends Widget {
|
|
|
|
public $configLists;
|
|
public $isRoot;
|
|
public $parent_id;
|
|
public $parent_key;
|
|
|
|
public function init() {
|
|
parent::init();
|
|
}
|
|
|
|
public function run() {
|
|
|
|
// $public_root = ['engine', 'recognition', 'open_door', 'screen', 'lang', 'camera'];
|
|
// $public_cfg = ['engine|cam_id', 'engine|server_authen', 'recognition|server_recog', 'open_door|enable', 'open_door|port_name', 'screen|banner', 'lang', 'camera|rgb', 'camera|ir', 'camera|rgb|url', 'camera|ir|url'];
|
|
$public_root = ['open_door', 'screen', 'lang', 'play_sound', 'background', 'filter', 'ads'];
|
|
$public_cfg = ['open_door|door_1', 'open_door|door_2', 'open_door|light', 'open_door|light|enable', 'open_door|light|start_at', 'open_door|light|end_at', 'filter|enable', 'filter|show_name', 'filter|urls', 'screen|banner', 'lang', 'ads|enable', 'ads|get_rules', 'ads|check_new_every', 'ads|ads_type', 'ads|show_video_after', 'ads|audio'];
|
|
|
|
return $this->render("config-tree", [
|
|
"configLists" => $this->configLists,
|
|
"isRoot" => $this->isRoot,
|
|
"parent_id" => $this->parent_id,
|
|
"parent_key" => $this->parent_key,
|
|
"public_root" => $public_root,
|
|
"public_cfg" => $public_cfg
|
|
]);
|
|
}
|
|
|
|
}
|