diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-11-12 13:02:36 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-11-12 13:02:36 +0100 |
commit | 1409f1c89a7ca01456ae2dcd6357d296e2b99f5a (patch) | |
tree | ffa30a9358e82d27be75d8fc5e57f3c8820dc6d3 /application/bookmark/BookmarkInitializer.php | |
parent | 054e03f37fa29da8066f1a637919f13c7e7dc5d2 (diff) | |
parent | a6935feb22df8d9634189ee87d257da9f03eedbd (diff) | |
download | Shaarli-v0.12.tar.gz Shaarli-v0.12.tar.zst Shaarli-v0.12.zip |
Diffstat (limited to 'application/bookmark/BookmarkInitializer.php')
-rw-r--r-- | application/bookmark/BookmarkInitializer.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/application/bookmark/BookmarkInitializer.php b/application/bookmark/BookmarkInitializer.php index 815047e3..8ab5c441 100644 --- a/application/bookmark/BookmarkInitializer.php +++ b/application/bookmark/BookmarkInitializer.php | |||
@@ -1,5 +1,7 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | declare(strict_types=1); | ||
4 | |||
3 | namespace Shaarli\Bookmark; | 5 | namespace Shaarli\Bookmark; |
4 | 6 | ||
5 | /** | 7 | /** |
@@ -11,6 +13,9 @@ namespace Shaarli\Bookmark; | |||
11 | * To prevent data corruption, it does not overwrite existing bookmarks, | 13 | * To prevent data corruption, it does not overwrite existing bookmarks, |
12 | * even though there should not be any. | 14 | * even though there should not be any. |
13 | * | 15 | * |
16 | * We disable this because otherwise it creates indentation issues, and heredoc is not supported by PHP gettext. | ||
17 | * @phpcs:disable Generic.Files.LineLength.TooLong | ||
18 | * | ||
14 | * @package Shaarli\Bookmark | 19 | * @package Shaarli\Bookmark |
15 | */ | 20 | */ |
16 | class BookmarkInitializer | 21 | class BookmarkInitializer |
@@ -23,7 +28,7 @@ class BookmarkInitializer | |||
23 | * | 28 | * |
24 | * @param BookmarkServiceInterface $bookmarkService | 29 | * @param BookmarkServiceInterface $bookmarkService |
25 | */ | 30 | */ |
26 | public function __construct($bookmarkService) | 31 | public function __construct(BookmarkServiceInterface $bookmarkService) |
27 | { | 32 | { |
28 | $this->bookmarkService = $bookmarkService; | 33 | $this->bookmarkService = $bookmarkService; |
29 | } | 34 | } |
@@ -31,13 +36,13 @@ class BookmarkInitializer | |||
31 | /** | 36 | /** |
32 | * Initialize the data store with default bookmarks | 37 | * Initialize the data store with default bookmarks |
33 | */ | 38 | */ |
34 | public function initialize() | 39 | public function initialize(): void |
35 | { | 40 | { |
36 | $bookmark = new Bookmark(); | 41 | $bookmark = new Bookmark(); |
37 | $bookmark->setTitle('quicksilver (loop) on Vimeo ' . t('(private bookmark with thumbnail demo)')); | 42 | $bookmark->setTitle('Calm Jazz Music - YouTube ' . t('(private bookmark with thumbnail demo)')); |
38 | $bookmark->setUrl('https://vimeo.com/153493904'); | 43 | $bookmark->setUrl('https://www.youtube.com/watch?v=DVEUcbPkb-c'); |
39 | $bookmark->setDescription(t( | 44 | $bookmark->setDescription(t( |
40 | 'Shaarli will automatically pick up the thumbnail for links to a variety of websites. | 45 | 'Shaarli will automatically pick up the thumbnail for links to a variety of websites. |
41 | 46 | ||
42 | Explore your new Shaarli instance by trying out controls and menus. | 47 | Explore your new Shaarli instance by trying out controls and menus. |
43 | Visit the project on [Github](https://github.com/shaarli/Shaarli) or [the documentation](https://shaarli.readthedocs.io/en/master/) to learn more about Shaarli. | 48 | Visit the project on [Github](https://github.com/shaarli/Shaarli) or [the documentation](https://shaarli.readthedocs.io/en/master/) to learn more about Shaarli. |
@@ -52,7 +57,7 @@ Now you can edit or delete the default shaares. | |||
52 | $bookmark = new Bookmark(); | 57 | $bookmark = new Bookmark(); |
53 | $bookmark->setTitle(t('Note: Shaare descriptions')); | 58 | $bookmark->setTitle(t('Note: Shaare descriptions')); |
54 | $bookmark->setDescription(t( | 59 | $bookmark->setDescription(t( |
55 | 'Adding a shaare without entering a URL creates a text-only "note" post such as this one. | 60 | 'Adding a shaare without entering a URL creates a text-only "note" post such as this one. |
56 | This note is private, so you are the only one able to see it while logged in. | 61 | This note is private, so you are the only one able to see it while logged in. |
57 | 62 | ||
58 | You can use this to keep notes, post articles, code snippets, and much more. | 63 | You can use this to keep notes, post articles, code snippets, and much more. |
@@ -89,7 +94,7 @@ Markdown also supports tables: | |||
89 | 'Shaarli - ' . t('The personal, minimalist, super-fast, database free, bookmarking service') | 94 | 'Shaarli - ' . t('The personal, minimalist, super-fast, database free, bookmarking service') |
90 | ); | 95 | ); |
91 | $bookmark->setDescription(t( | 96 | $bookmark->setDescription(t( |
92 | 'Welcome to Shaarli! | 97 | 'Welcome to Shaarli! |
93 | 98 | ||
94 | Shaarli allows you to bookmark your favorite pages, and share them with others or store them privately. | 99 | Shaarli allows you to bookmark your favorite pages, and share them with others or store them privately. |
95 | You can add a description to your bookmarks, such as this one, and tag them. | 100 | You can add a description to your bookmarks, such as this one, and tag them. |