Example #1
0
 /**
  * @param null $scope
  * @return \Roles
  */
 public static function retrieveRoot($scope = null)
 {
     $root = new self();
     $root = $root->findRoot($scope);
     if (!$root) {
         $root = new self();
         $root->scope = $scope;
         $root->taxonomy = $scope;
         $root->name = 'Root of ' . $scope;
         $root->makeRoot();
         $root->save();
     }
     return $root;
 }