File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/main/php/de/thekid/dialog/import Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php namespace de \thekid \dialog \import ;
2+
3+ use de \thekid \dialog \processing \Files ;
4+
5+ /** Imports the cover image */
6+ class Content extends Source {
7+
8+ public function entryFrom (Description $ description ): array<string, mixed > {
9+ return [
10+ 'slug ' => '@cover ' ,
11+ 'parent ' => '~ ' ,
12+ 'date ' => $ description ->meta ['date ' ],
13+ 'title ' => $ description ->meta ['title ' ],
14+ 'keywords ' => $ description ->meta ['keywords ' ] ?? [],
15+ 'content ' => $ description ->content ,
16+ 'locations ' => [...$ description ->locations ($ description ->meta ['date ' ]->getTimeZone ())],
17+ 'is ' => ['cover ' => true ],
18+ ];
19+ }
20+
21+ public function contentsIn (Files $ files ): iterable {
22+ yield from $ this ->mediaIn ($ files );
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments