Exemplo n.º 1
0
 public function makeRootIfNotExist()
 {
     $root = $this->getRoot();
     if (!$root) {
         $root = new Comment();
         $root->model_name = $this->model_name;
         $root->model_id = $this->model_id;
         $root->content = 'root';
         $root->name = 'root';
         $root->makeRoot();
     }
     return $root;
 }