src/bbn/ide/directories.php
public function dirs($code=false){
    $all = $this->options->full_soptions(self::_dev_path());
    $cats = [];
    $r = [];
    foreach ( $all as $a ){
      if ( \defined($a['bbn_path']) ){
        $k = $a['bbn_path'] . '/' . ($a['code'] === '/' ? '' : $a['code']);
        if ( !isset($cats[$a['id_alias']]) ){
          unset($a['alias']['cfg']);
          $cats[$a['id_alias']] = $a['alias'];
        }
        unset($a['cfg']);
        unset($a['alias']);
        $r[$k] = $a;
        $r[$k]['title'] = $r[$k]['text'];
        $r[$k]['alias_code'] = $cats[$a['id_alias']]['code'];
        if ( !empty($cats[$a['id_alias']]['tabs']) ){
          $r[$k]['tabs'] = $cats[$a['id_alias']]['tabs'];
        }
        else{
          $r[$k]['extensions'] = $cats[$a['id_alias']]['extensions'];
        }
        unset($r[$k]['alias']);
      }
    }
    if ( $code ){
      return isset($r[$code]) ? $r[$code] : false;
    }
    return $r;
  }
public function dirs($code=false){
    $all = $this->options->full_soptions(self::_dev_path());
    $cats = [];
    $r = [];
    foreach ( $all as $a ){
      if ( \defined($a['bbn_path']) ){
        $k = $a['bbn_path'] . '/' . ($a['code'] === '/' ? '' : $a['code']);
        if ( !isset($cats[$a['id_alias']]) ){
          unset($a['alias']['cfg']);
          $cats[$a['id_alias']] = $a['alias'];
        }
        unset($a['cfg']);
        unset($a['alias']);
        $r[$k] = $a;
        $r[$k]['title'] = $r[$k]['text'];
        $r[$k]['alias_code'] = $cats[$a['id_alias']]['code'];
        if ( !empty($cats[$a['id_alias']]['tabs']) ){
          $r[$k]['tabs'] = $cats[$a['id_alias']]['tabs'];
        }
        else{
          $r[$k]['extensions'] = $cats[$a['id_alias']]['extensions'];
        }
        unset($r[$k]['alias']);
      }
    }
    if ( $code ){
      return isset($r[$code]) ? $r[$code] : false;
    }
    return $r;
  }
public function dirs ( $ code = false ) { $ all = $ this -> options -> full_soptions ( self :: _dev_path ( ) ) ; $ cats = [ ] ; $ r = [ ] ; foreach ( $ all as $ a ) { if ( \ defined ( $ a [ 'bbn_path' ] ) ) { $ k = $ a [ 'bbn_path' ] . '/' . ( $ a [ 'code' ] === '/' ? '' : $ a [ 'code' ] ) ; if ( ! isset ( $ cats [ $ a [ 'id_alias' ] ] ) ) { unset ( $ a [ 'alias' ] [ 'cfg' ] ) ; $ cats [ $ a [ 'id_alias' ] ] = $ a [ 'alias' ] ; } unset ( $ a [ 'cfg' ] ) ; unset ( $ a [ 'alias' ] ) ; $ r [ $ k ] = $ a ; $ r [ $ k ] [ 'title' ] = $ r [ $ k ] [ 'text' ] ; $ r [ $ k ] [ 'alias_code' ] = $ cats [ $ a [ 'id_alias' ] ] [ 'code' ] ; if ( ! empty ( $ cats [ $ a [ 'id_alias' ] ] [ 'tabs' ] ) ) { $ r [ $ k ] [ 'tabs' ] = $ cats [ $ a [ 'id_alias' ] ] [ 'tabs' ] ; } else { $ r [ $ k ] [ 'extensions' ] = $ cats [ $ a [ 'id_alias' ] ] [ 'extensions' ] ; } unset ( $ r [ $ k ] [ 'alias' ] ) ; } } if ( $ code ) { return isset ( $ r [ $ code ] ) ? $ r [ $ code ] : false ; } return $ r ; }
Make dirs' configurations

@param string|bool $code The dir's name (code)
@return array|bool
Make dirs configurations