code: public function onModify(ItemPipelineEvent $event)
      {
          $item = $event->getItem();
  
          if ($item instanceof ImportItem) {
              $this->modify($item, $event);
          } elseif ($item instanceof SyncExecuteItem) {
              $syncStorageData = $item->getSyncStorageData();
  
              if ($syncStorageData['type'] !== ActionTypes::DELETE) {
                  $this->modify($item, $event);
              } else {
                  ItemSkipper::skip($event, 'Delete item with id = ' . $syncStorageData['id']);
              }
          } else {
              $this->log('The type of provided item is not ImportItem or SyncExecuteItem.', LogLevel::ERROR);
          }
      }
docs: Modify event.
  
  @param ItemPipelineEvent $event