src/bbn/user/preferences.php
public function get_tree(string $id, bool $with_config = true): array
  {
    if (
      \bbn\str::is_uid($id) &&
      ($p = $this->get($id, $with_config))
    ){
      $p['items'] = $this->get_full_bits($id, null, $with_config);
      return $p;
    }
    return [];
  }
public function get_tree(string $id, bool $with_config = true): array
  {
    if (
      \bbn\str::is_uid($id) &&
      ($p = $this->get($id, $with_config))
    ){
      $p['items'] = $this->get_full_bits($id, null, $with_config);
      return $p;
    }
    return [];
  }
public function get_tree ( string $ id , bool $ with_config = true ) : array { if ( \ bbn \ str :: is_uid ( $ id ) && ( $ p = $ this -> get ( $ id , $ with_config ) ) ) { $ p [ 'items' ] = $ this -> get_full_bits ( $ id , null , $ with_config ) ; return $ p ; } return [ ] ; }
Returns a preference and its hierarchical bits list

@param string $id The preference's ID
@param bool $with_config Set it to false if you don't want the preference's cfg field values on the results.
Returns a preference and its hierarchical bits list