protected $skippedEntries = 0;
protected $importedEntries = 0;
protected $filepath;
+ protected $markAsRead;
public function __construct(EntityManager $em, ContentProxy $contentProxy)
{
*/
public function getDescription()
{
- return 'This importer will import all your wallabag v1 articles. On your config page, click on "JSON export" in the "Export your wallabag data" section. You will have a "wallabag-export-1-xxxx-xx-xx.json" file.';
+ return 'import.wallabag_v1.description';
}
/**
return $this;
}
+ /**
+ * Set whether articles must be all marked as read.
+ *
+ * @param bool $markAsRead
+ */
+ public function setMarkAsRead($markAsRead)
+ {
+ $this->markAsRead = $markAsRead;
+
+ return $this;
+ }
+
/**
* @param $entries
*/
);
}
- $entry->setArchived($importedEntry['is_read']);
+ $entry->setArchived($importedEntry['is_read'] || $this->markAsRead);
$entry->setStarred($importedEntry['is_fav']);
$this->em->persist($entry);