Example #1
0
 /**
  * 返回access 里面name
  */
 function access()
 {
     $model = Access::find()->all();
     $t = \app\core\Arr::parentTree($model, $this->access_id);
     unset($s);
     foreach ($t as $v) {
         $s .= $v . ".";
     }
     return substr($s, 0, -1);
 }
Example #2
0
 /**
  * 显示 向上的树结构
  */
 function getGroup_tree()
 {
     if (0 == $this->pid) {
         return __('root');
     }
     $data = static::find()->all();
     $out = \app\core\Arr::parentTree($data, $this->pid);
     return implode("<br>", $out);
 }