PHPWord icon indicating copy to clipboard operation
PHPWord copied to clipboard

How To use cloneBlock and add an Image

Open samuel-lujan opened this issue 2 years ago • 0 comments

I need to replace some block with some parameters and one of this parameters is an image. How to replace it?

Today I have this:

foreach ($order->itens as $item){
    array_push($products,
        "product"  => "{$item->quantity} - {$item->name}",
        "processor"=> $item->processor ?? 'Não se aplica',
         "memory"   => $item->memory ?? 'Não se aplica',
         "disk"     => $item->disk ?? 'Não se aplica',
          "screen"   => $item->screen ?? 'Não se aplica',
          // 'image'    =>  don´t know how to implements ,
      ]);
}
$word->cloneBlock('productTable', 0, true, false, $products);

samuel-lujan avatar Aug 15 '22 19:08 samuel-lujan