/**
  * @param Media $originalResourceModel
  * @param array $valueIdMap
  * @return array
  *
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function afterDuplicate(Media $originalResourceModel, array $valueIdMap)
 {
     $mediaGalleryEntitiesData = $this->videoResourceModel->loadByIds(array_keys($valueIdMap));
     foreach ($mediaGalleryEntitiesData as $row) {
         $row['value_id'] = $valueIdMap[$row['value_id']];
         $this->videoResourceModel->insertOnDuplicate($row);
     }
     return $valueIdMap;
 }
 /**
  * @param array $item
  * @return void
  */
 protected function saveVideoValuesItem(array $item)
 {
     $this->videoResourceModel->insertOnDuplicate($this->prepareVideoRowDataForSave($item));
 }