original_string: 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;
    }
code: 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;
    }
code_tokens: 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 ; }
docstring: Gets the user' shortcuts list
  
  @return null|array
docstring_tokens: Gets the user shortcuts list