1 | <?php |
||
12 | class SyncContentsCommand extends AbstractSyncCommand |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $signature = 'contentful:contents:sync |
||
19 | {contentType? : The content type, e.g. "article" or "brand". Omit to synchronize all content types.} |
||
20 | {--ignoreErrors : Whether to ignore errors when synchronizing, useful to get around circular references.} |
||
21 | {--ignoreExisting : Whether to ignore existing entries, i.e. only synchronize new entries.}'; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $description = 'Synchronizes content from Contentful'; |
||
27 | |||
28 | /** |
||
29 | * @var boolean |
||
30 | */ |
||
31 | private $ignoreErrors; |
||
32 | |||
33 | /** |
||
34 | * @inheritdoc |
||
35 | */ |
||
36 | protected function getQuery(?string $contentType = null): Query |
||
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | */ |
||
48 | protected function getTotalQuery(?string $contentType = null): Query |
||
56 | |||
57 | /** |
||
58 | * @inheritdoc |
||
59 | */ |
||
60 | public function handle() |
||
75 | |||
76 | /** |
||
77 | * @param string $contentType |
||
78 | * |
||
79 | * @throws \Throwable |
||
80 | */ |
||
81 | private function synchronizeContentType(string $contentType) |
||
123 | } |
||
124 |