original_string: public function onGenerateThumbnails()
      {
          $batch = Input::get('batch');
          if (!is_array($batch)) {
              return;
          }
  
          $result = [];
          foreach ($batch as $thumbnailInfo) {
              $result[] = $this->generateThumbnail($thumbnailInfo);
          }
  
          return [
              'generatedThumbnails'=>$result
          ];
      }
code: public function onGenerateThumbnails()
      {
          $batch = Input::get('batch');
          if (!is_array($batch)) {
              return;
          }
  
          $result = [];
          foreach ($batch as $thumbnailInfo) {
              $result[] = $this->generateThumbnail($thumbnailInfo);
          }
  
          return [
              'generatedThumbnails'=>$result
          ];
      }
code_tokens: public function onGenerateThumbnails ( ) { $ batch = Input :: get ( 'batch' ) ; if ( ! is_array ( $ batch ) ) { return ; } $ result = [ ] ; foreach ( $ batch as $ thumbnailInfo ) { $ result [ ] = $ this -> generateThumbnail ( $ thumbnailInfo ) ; } return [ 'generatedThumbnails' => $ result ] ; }
docstring: Generate thumbnail AJAX handler
  @return array
docstring_tokens: Generate thumbnail AJAX handler