34 lines
963 B
PHP
34 lines
963 B
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'];
|
|
|
|
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
|
|
]);
|
|
}
|
|
|
|
}
|