original_string: public function publishSlides()
      {
          $slides = SlideImage::get();
          $ct = 0;
          foreach ($this->getSlides() as $slide) {
              if ($slide->ShowSlide == 1) {
                  if (!$slide->Name) {
                      $slide->Name = "No Name";
                  }
                  $slide->writeToStage('Stage');
                  $slide->publishRecursive();
                  ++$ct;
              }
          }
          static::write_message($ct . " SlideImages updated");
      }
code: public function publishSlides()
      {
          $slides = SlideImage::get();
          $ct = 0;
          foreach ($this->getSlides() as $slide) {
              if ($slide->ShowSlide == 1) {
                  if (!$slide->Name) {
                      $slide->Name = "No Name";
                  }
                  $slide->writeToStage('Stage');
                  $slide->publishRecursive();
                  ++$ct;
              }
          }
          static::write_message($ct . " SlideImages updated");
      }
code_tokens: public function publishSlides ( ) { $ slides = SlideImage :: get ( ) ; $ ct = 0 ; foreach ( $ this -> getSlides ( ) as $ slide ) { if ( $ slide -> ShowSlide == 1 ) { if ( ! $ slide -> Name ) { $ slide -> Name = "No Name" ; } $ slide -> writeToStage ( 'Stage' ) ; $ slide -> publishRecursive ( ) ; ++ $ ct ; } } static :: write_message ( $ ct . " SlideImages updated" ) ; }
docstring: mark all ProductDetail records as ShowInMenus = 0.
docstring_tokens: mark all ProductDetail records as ShowInMenus = 0 .