public function duplicate(ItemTypeInterface $original) { /** @var CiteText $data */ /** @var CiteText $original */ $data = new $this->dataClass(); $data->setCite($original->getCite()); return $data; }
public function duplicate(ItemTypeInterface $original) { /** @var Video $data */ /** @var Video $original */ $data = new $this->dataClass(); $data->setTitle($original->getTitle()); $data->setUrl($original->getUrl()); return $data; }
public function duplicate(ItemTypeInterface $original) { /** @var Picture $data */ /** @var Picture $original */ $data = new $this->dataClass(); $data->setTitle($original->getTitle()); $data->setCaption($original->getCaption()); $newFile = $this->getFileFactory()->duplicate($original->getFile()); $data->setFile($newFile); return $data; }
public function duplicate(ItemTypeInterface $original) { /** @var DownloadItem $data */ /** @var DownloadItem $original */ $data = new $this->dataClass(); $data->setTitle($original->getTitle()); $data->setDownload($original->getDownload()); if ($original->getFile()) { $newFile = $this->getFileFactory()->duplicate($original->getFile()); $data->setFile($newFile); } return $data; }
public function duplicate(ItemTypeInterface $original) { /** @var Gallery $data */ /** @var Gallery $original */ $data = new $this->dataClass(); $data->setTitle($original->getTitle()); $data->setText($original->getText()); foreach ($original->getFiles() as $file) { $newFile = $this->getFileFactory()->duplicate($file); $data->addFile($newFile); } return $data; }
public function duplicate(ItemTypeInterface $original) { /** @var ThreePicture $data */ /** @var ThreePicture $original */ $data = new $this->dataClass(); $data->setTitleLeft($original->getTitleLeft()); $data->setCaptionLeft($original->getCaptionLeft()); $data->setTitleCenter($original->getTitleCenter()); $data->setCaptionCenter($original->getCaptionCenter()); $data->setTitleRight($original->getTitleRight()); $data->setCaptionRight($original->getCaptionRight()); $newFile = $this->getFileFactory()->duplicate($original->getFileLeft()); $data->setFileLeft($newFile); $newFile = $this->getFileFactory()->duplicate($original->getFileCenter()); $data->setFileCenter($newFile); $newFile = $this->getFileFactory()->duplicate($original->getFileRight()); $data->setFileRight($newFile); return $data; }
public function duplicate(ItemTypeInterface $original) { /** @var TextText $data */ /** @var TextText $original */ $data = new $this->dataClass(); $data->setTitle($original->getTitle()); $data->setTitleLeft($original->getTitleLeft()); $data->setTextLeft($original->getTextLeft()); $data->setTitleRight($original->getTitleRight()); $data->setTextRight($original->getTextRight()); $data->setLayout($original->getLayout()); return $data; }