code: private function processToolbar(array $toolbar)
      {
          $str = '';
          foreach ($toolbar as $key => $tb) {
              $str .= sprintf("[ '%s', ", $key);
              $str .= json_encode($tb);
              $str .= '], ';
          }
  
          return $str;
      }
docs: Return [ $key, [data, data] ],.
  
  @param array $toolbar
  
  @return string