- if (array_key_exists('tags', $data)) {
- $this->contentProxy->assignTagsToEntry(
- $entry,
- $data['tags']
- );
- }
-
- if (isset($importedEntry['preview_picture'])) {
- $entry->setPreviewPicture($importedEntry['preview_picture']);
- }
-
- $entry->setArchived($data['is_archived']);
- $entry->setStarred($data['is_starred']);
-
- $this->em->persist($entry);
- ++$this->importedEntries;
-
- // flush every 20 entries
- if (($i % 20) === 0) {
- $this->em->flush();
- $this->em->clear($entry);
- }
- ++$i;
+ if (isset($importedEntry['preview_picture'])) {
+ $entry->setPreviewPicture($importedEntry['preview_picture']);