src/bbn/appui/menus.php
public function shortcuts(): ?array
  {
    if (
      ($id_option = $this->from_path('shortcuts')) &&
      ($menu = $this->pref->get_by_option($id_option))
    ){
      $links = $this->pref->get_bits($menu['id']);
      $res = [];
      foreach ( $links as $link ){
        if ( ($url = $this->to_path($link['id_option'])) ){
          $res[] = [
            'id' => $link['id'],
            'id_option' => $link['id_option'],
            'url' => $url,
            'text' => $link['text'],
            'icon' => $link['icon'],
            'num' => $link['num']
          ];
        }
      }
      return $res;
    }
    return null;
  }
public function shortcuts(): ?array
  {
    if (
      ($id_option = $this->from_path('shortcuts')) &&
      ($menu = $this->pref->get_by_option($id_option))
    ){
      $links = $this->pref->get_bits($menu['id']);
      $res = [];
      foreach ( $links as $link ){
        if ( ($url = $this->to_path($link['id_option'])) ){
          $res[] = [
            'id' => $link['id'],
            'id_option' => $link['id_option'],
            'url' => $url,
            'text' => $link['text'],
            'icon' => $link['icon'],
            'num' => $link['num']
          ];
        }
      }
      return $res;
    }
    return null;
  }
public function shortcuts ( ) : ? array { if ( ( $ id_option = $ this -> from_path ( 'shortcuts' ) ) && ( $ menu = $ this -> pref -> get_by_option ( $ id_option ) ) ) { $ links = $ this -> pref -> get_bits ( $ menu [ 'id' ] ) ; $ res = [ ] ; foreach ( $ links as $ link ) { if ( ( $ url = $ this -> to_path ( $ link [ 'id_option' ] ) ) ) { $ res [ ] = [ 'id' => $ link [ 'id' ] , 'id_option' => $ link [ 'id_option' ] , 'url' => $ url , 'text' => $ link [ 'text' ] , 'icon' => $ link [ 'icon' ] , 'num' => $ link [ 'num' ] ] ; } } return $ res ; } return null ; }
Gets the user' shortcuts list

@return null|array
Gets the user shortcuts list