original_string: protected function setDataProductEditReview()
      {
          $product_id = $this->getData('review.product_id');
  
          $products = array();
  
          if (!empty($product_id)) {
  
              $product = $this->product->get($product_id);
  
              $options = array(
                  'entity' => 'product',
                  'entity_id' => $product_id,
                  'template_item' => 'backend|content/product/suggestion'
              );
  
              $this->setItemThumb($product, $this->image, $options);
              $this->setItemPriceFormatted($product, $this->price);
              $this->setItemRendered($product, array('item' => $product), $options);
              $products = array($product);
          }
  
          $widget = array(
              'multiple' => false,
              'products' => $products,
              'name' => 'review[product_id]',
              'error' => $this->error('product_id')
          );
  
          $this->setData('product_picker', $this->getWidgetProductPicker($widget));
      }
code: protected function setDataProductEditReview()
      {
          $product_id = $this->getData('review.product_id');
  
          $products = array();
  
          if (!empty($product_id)) {
  
              $product = $this->product->get($product_id);
  
              $options = array(
                  'entity' => 'product',
                  'entity_id' => $product_id,
                  'template_item' => 'backend|content/product/suggestion'
              );
  
              $this->setItemThumb($product, $this->image, $options);
              $this->setItemPriceFormatted($product, $this->price);
              $this->setItemRendered($product, array('item' => $product), $options);
              $products = array($product);
          }
  
          $widget = array(
              'multiple' => false,
              'products' => $products,
              'name' => 'review[product_id]',
              'error' => $this->error('product_id')
          );
  
          $this->setData('product_picker', $this->getWidgetProductPicker($widget));
      }
code_tokens: protected function setDataProductEditReview ( ) { $ product_id = $ this -> getData ( 'review.product_id' ) ; $ products = array ( ) ; if ( ! empty ( $ product_id ) ) { $ product = $ this -> product -> get ( $ product_id ) ; $ options = array ( 'entity' => 'product' , 'entity_id' => $ product_id , 'template_item' => 'backend|content/product/suggestion' ) ; $ this -> setItemThumb ( $ product , $ this -> image , $ options ) ; $ this -> setItemPriceFormatted ( $ product , $ this -> price ) ; $ this -> setItemRendered ( $ product , array ( 'item' => $ product ) , $ options ) ; $ products = array ( $ product ) ; } $ widget = array ( 'multiple' => false , 'products' => $ products , 'name' => 'review[product_id]' , 'error' => $ this -> error ( 'product_id' ) ) ; $ this -> setData ( 'product_picker' , $ this -> getWidgetProductPicker ( $ widget ) ) ; }
docstring: Set product template data
docstring_tokens: Set product template data