@@ -51,14 +51,18 @@ public function __construct(
5151 $ this ->storeRepository = $ storeRepository ;
5252 }
5353
54- public function execute (array $ types , ?array $ identifiers )
54+ public function execute (array $ types , ?array $ identifiers, bool $ importAll )
5555 {
5656 $ workingDirPath = 'sync_cms_data ' ;
5757
5858 if (!$ this ->directoryRead ->isExist ($ this ->varPath . $ workingDirPath )) {
5959 throw new \Exception ('The sync folder does not exists! Path: ' . $ workingDirPath );
6060 }
6161
62+ if (!$ identifiers && !$ importAll ) {
63+ throw new \Exception ('If you want to import all entries at once, use --importAll flag ' );
64+ }
65+
6266 foreach ($ types as $ type ) {
6367 $ typeDirPath = $ workingDirPath . sprintf ('/cms/%ss/ ' , $ type );
6468 if (!$ this ->directoryRead ->isExist ($ this ->varPath . $ typeDirPath )) {
@@ -129,6 +133,10 @@ private function importBlocks(string $dirPath, ?array $identifiers): void
129133 $ block ->setIdentifier ($ jsonData ['identifier ' ]);
130134 $ block ->setIsActive ((bool )$ jsonData ['is_active ' ]);
131135 $ block ->setStores ($ storeIds );
136+ if (isset ($ jsonData ['is_tailwindcss_jit_enabled ' ])) {
137+ $ block ->setIsTailwindcssJitEnabled ($ jsonData ['is_tailwindcss_jit_enabled ' ]);
138+ }
139+
132140 try {
133141 $ this ->blockRepository ->save ($ block );
134142 } catch (\Exception $ exception ) {
@@ -178,6 +186,9 @@ private function importPages(string $dirPath, ?array $identifiers): void
178186 $ page ->setContentHeading ($ jsonData ['content_heading ' ]);
179187 $ page ->setIsActive ((bool )$ jsonData ['is_active ' ]);
180188 $ page ->setStores ($ storeIds );
189+ if (isset ($ jsonData ['is_tailwindcss_jit_enabled ' ])) {
190+ $ page ->setIsTailwindcssJitEnabled ($ jsonData ['is_tailwindcss_jit_enabled ' ]);
191+ }
181192
182193 try {
183194 $ this ->pageRepository ->save ($ page );
0 commit comments