original_string: protected function setDataRecentIndexProduct()
      {
          $products = $this->getRecentProduct();
  
          if (!empty($products)) {
  
              $pager_options = array(
                  'key' => 'pwp',
                  'total' => count($products),
                  'limit' => $this->config('product_view_pager_limit', 4)
              );
  
              $pager = $this->getPager($pager_options);
  
              if (!empty($pager['limit'])) {
                  list($from, $to) = $pager['limit'];
                  $products = array_slice($products, $from, $to, true);
              }
  
              $data = array('pager' => $pager['rendered'], 'products' => $products);
              $this->setData('recent', $this->render('product/recent', $data));
          }
      }
code: protected function setDataRecentIndexProduct()
      {
          $products = $this->getRecentProduct();
  
          if (!empty($products)) {
  
              $pager_options = array(
                  'key' => 'pwp',
                  'total' => count($products),
                  'limit' => $this->config('product_view_pager_limit', 4)
              );
  
              $pager = $this->getPager($pager_options);
  
              if (!empty($pager['limit'])) {
                  list($from, $to) = $pager['limit'];
                  $products = array_slice($products, $from, $to, true);
              }
  
              $data = array('pager' => $pager['rendered'], 'products' => $products);
              $this->setData('recent', $this->render('product/recent', $data));
          }
      }
code_tokens: protected function setDataRecentIndexProduct ( ) { $ products = $ this -> getRecentProduct ( ) ; if ( ! empty ( $ products ) ) { $ pager_options = array ( 'key' => 'pwp' , 'total' => count ( $ products ) , 'limit' => $ this -> config ( 'product_view_pager_limit' , 4 ) ) ; $ pager = $ this -> getPager ( $ pager_options ) ; if ( ! empty ( $ pager [ 'limit' ] ) ) { list ( $ from , $ to ) = $ pager [ 'limit' ] ; $ products = array_slice ( $ products , $ from , $ to , true ) ; } $ data = array ( 'pager' => $ pager [ 'rendered' ] , 'products' => $ products ) ; $ this -> setData ( 'recent' , $ this -> render ( 'product/recent' , $ data ) ) ; } }
docstring: Sets the recent products block
docstring_tokens: Sets the recent products block