init Area full CRUD
This commit is contained in:
24
widgets/TreeSub.php
Normal file
24
widgets/TreeSub.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace app\widgets;
|
||||
|
||||
use yii\base\Widget;
|
||||
|
||||
class TreeSub extends Widget {
|
||||
|
||||
public $pid;
|
||||
public $model;
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
}
|
||||
|
||||
public function run() {
|
||||
|
||||
return $this->render("tree-sub", [
|
||||
"lists" => $this->model->find()->andWhere(['pid' => $this->pid])->all(),
|
||||
"model" => $this->model
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user