]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/ImportBundle/Import/WallabagV2Import.php
Refacto wallabag import
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / WallabagV2Import.php
CommitLineData
6785f4aa
NL
1<?php
2
3namespace Wallabag\ImportBundle\Import;
4
b787a775 5class WallabagV2Import extends WallabagImport
6785f4aa
NL
6{
7 /**
8 * {@inheritdoc}
9 */
10 public function getName()
11 {
12 return 'wallabag v2';
13 }
14
15 /**
16 * {@inheritdoc}
17 */
18 public function getUrl()
19 {
20 return 'import_wallabag_v2';
21 }
22
23 /**
24 * {@inheritdoc}
25 */
26 public function getDescription()
27 {
0d42217e 28 return 'import.wallabag_v2.description';
6785f4aa
NL
29 }
30
31 /**
b787a775 32 * {@inheritdoc}
6785f4aa 33 */
b787a775 34 protected function prepareEntry($entry = [], $markAsRead = false)
6785f4aa 35 {
b787a775
JB
36 return [
37 'html' => $entry['content'],
38 'content_type' => $entry['mimetype'],
39 'is_archived' => ($entry['is_archived'] || $markAsRead),
40 ] + $entry;
6785f4aa
NL
41 }
42}