]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/FirefoxImport.php
Add a real configuration for CS-Fixer
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / FirefoxImport.php
index 1a0b1154306d1a6de868995b21da1991236f807f..c18e7e93e64e42679cbf66567b72b1a3a80064f4 100644 (file)
@@ -29,4 +29,26 @@ class FirefoxImport extends BrowserImport
     {
         return 'import.firefox.description';
     }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function prepareEntry(array $entry = [])
+    {
+        $data = [
+            'title' => $entry['title'],
+            'html' => false,
+            'url' => $entry['uri'],
+            'is_archived' => (int) $this->markAsRead,
+            'is_starred' => false,
+            'tags' => '',
+            'created_at' => substr($entry['dateAdded'], 0, 10),
+        ];
+
+        if (array_key_exists('tags', $entry) && $entry['tags'] !== '') {
+            $data['tags'] = $entry['tags'];
+        }
+
+        return $data;
+    }
 }