示例#1
0
 public function duplicate(ItemTypeInterface $original)
 {
     /** @var PicturePicture $data */
     /** @var PicturePicture $original */
     $data = new $this->dataClass();
     $data->setTitle($original->getTitle());
     $data->setCaptionLeft($original->getCaptionLeft());
     $data->setCaptionRight($original->getCaptionRight());
     $newFile = $this->getFileFactory()->duplicate($original->getFileLeft());
     $data->setFileLeft($newFile);
     $newFile = $this->getFileFactory()->duplicate($original->getFileRight());
     $data->setFileRight($newFile);
     return $data;
 }