@@ -47,50 +47,3 @@  | 
                                                    ||
| 47 | 47 | ->setName(self::$defaultName)  | 
                                                        
| 48 | 48 |              ->setDescription('Downloads theme from configured storage.') | 
                                                        
| 49 | 49 | ->setHelp(<<<'EOT'  | 
                                                        
| 50 | -Location for themes archive can be defined by `THEMES_DOWNLOAD_URL` env variable.  | 
                                                        |
| 51 | -  | 
                                                        |
| 52 | -Themes must be packed into one compressed file (*.zip).  | 
                                                        |
| 53 | -Archive can be created with 'zip -r ../themes.zip *' command (called from your themes directory).  | 
                                                        |
| 54 | -  | 
                                                        |
| 55 | -Remember that themes must be located in their tenants directories. Example:  | 
                                                        |
| 56 | -  | 
                                                        |
| 57 | -123abc  | 
                                                        |
| 58 | - theme_1  | 
                                                        |
| 59 | - theme_2  | 
                                                        |
| 60 | -456def  | 
                                                        |
| 61 | - theme_3  | 
                                                        |
| 62 | -  | 
                                                        |
| 63 | -EOT);  | 
                                                        |
| 64 | - }  | 
                                                        |
| 65 | -  | 
                                                        |
| 66 | - protected function execute(InputInterface $input, OutputInterface $output): void  | 
                                                        |
| 67 | -    { | 
                                                        |
| 68 | -        if ('' === $this->themesUrl) { | 
                                                        |
| 69 | -            $output->writeln('<bg=red;options=bold>Themes archive url is empty.</>'); | 
                                                        |
| 70 | -  | 
                                                        |
| 71 | - return;  | 
                                                        |
| 72 | - }  | 
                                                        |
| 73 | - $client = new Client();  | 
                                                        |
| 74 | - $tempLocation = rtrim(sys_get_temp_dir(), '/').DIRECTORY_SEPARATOR.'themes.zip';  | 
                                                        |
| 75 | -  | 
                                                        |
| 76 | -        try { | 
                                                        |
| 77 | -            $client->request('GET', $this->themesUrl, ['sink' => $tempLocation]); | 
                                                        |
| 78 | -        } catch (ConnectException $e) { | 
                                                        |
| 79 | -            $output->writeln(sprintf("<bg=red;options=bold>Can't download themes package from '%s'.</>", $this->themesUrl)); | 
                                                        |
| 80 | - }  | 
                                                        |
| 81 | -  | 
                                                        |
| 82 | - $filesystem = new Filesystem();  | 
                                                        |
| 83 | -  | 
                                                        |
| 84 | - $zip = new \ZipArchive();  | 
                                                        |
| 85 | -        if (true === $zip->open($tempLocation)) { | 
                                                        |
| 86 | -            if (!$filesystem->exists($this->themesDirectory)) { | 
                                                        |
| 87 | - $filesystem->mkdir($this->themesDirectory);  | 
                                                        |
| 88 | - }  | 
                                                        |
| 89 | -  | 
                                                        |
| 90 | - $zip->extractTo($this->themesDirectory);  | 
                                                        |
| 91 | - $zip->close();  | 
                                                        |
| 92 | - }  | 
                                                        |
| 93 | -  | 
                                                        |
| 94 | -        $output->writeln('<bg=green;options=bold>Themes were downloaded and extracted.</>'); | 
                                                        |
| 95 | - }  | 
                                                        |
| 96 | -}  | 
                                                        |
@@ -47,50 +47,3 @@  | 
                                                    ||
| 47 | 47 | ->setName(self::$defaultName)  | 
                                                        
| 48 | 48 |              ->setDescription('Downloads theme from configured storage.') | 
                                                        
| 49 | 49 | ->setHelp(<<<'EOT'  | 
                                                        
| 50 | -Location for themes archive can be defined by `THEMES_DOWNLOAD_URL` env variable.  | 
                                                        |
| 51 | -  | 
                                                        |
| 52 | -Themes must be packed into one compressed file (*.zip).  | 
                                                        |
| 53 | -Archive can be created with 'zip -r ../themes.zip *' command (called from your themes directory).  | 
                                                        |
| 54 | -  | 
                                                        |
| 55 | -Remember that themes must be located in their tenants directories. Example:  | 
                                                        |
| 56 | -  | 
                                                        |
| 57 | -123abc  | 
                                                        |
| 58 | - theme_1  | 
                                                        |
| 59 | - theme_2  | 
                                                        |
| 60 | -456def  | 
                                                        |
| 61 | - theme_3  | 
                                                        |
| 62 | -  | 
                                                        |
| 63 | -EOT);  | 
                                                        |
| 64 | - }  | 
                                                        |
| 65 | -  | 
                                                        |
| 66 | - protected function execute(InputInterface $input, OutputInterface $output): void  | 
                                                        |
| 67 | -    { | 
                                                        |
| 68 | -        if ('' === $this->themesUrl) { | 
                                                        |
| 69 | -            $output->writeln('<bg=red;options=bold>Themes archive url is empty.</>'); | 
                                                        |
| 70 | -  | 
                                                        |
| 71 | - return;  | 
                                                        |
| 72 | - }  | 
                                                        |
| 73 | - $client = new Client();  | 
                                                        |
| 74 | - $tempLocation = rtrim(sys_get_temp_dir(), '/').DIRECTORY_SEPARATOR.'themes.zip';  | 
                                                        |
| 75 | -  | 
                                                        |
| 76 | -        try { | 
                                                        |
| 77 | -            $client->request('GET', $this->themesUrl, ['sink' => $tempLocation]); | 
                                                        |
| 78 | -        } catch (ConnectException $e) { | 
                                                        |
| 79 | -            $output->writeln(sprintf("<bg=red;options=bold>Can't download themes package from '%s'.</>", $this->themesUrl)); | 
                                                        |
| 80 | - }  | 
                                                        |
| 81 | -  | 
                                                        |
| 82 | - $filesystem = new Filesystem();  | 
                                                        |
| 83 | -  | 
                                                        |
| 84 | - $zip = new \ZipArchive();  | 
                                                        |
| 85 | -        if (true === $zip->open($tempLocation)) { | 
                                                        |
| 86 | -            if (!$filesystem->exists($this->themesDirectory)) { | 
                                                        |
| 87 | - $filesystem->mkdir($this->themesDirectory);  | 
                                                        |
| 88 | - }  | 
                                                        |
| 89 | -  | 
                                                        |
| 90 | - $zip->extractTo($this->themesDirectory);  | 
                                                        |
| 91 | - $zip->close();  | 
                                                        |
| 92 | - }  | 
                                                        |
| 93 | -  | 
                                                        |
| 94 | -        $output->writeln('<bg=green;options=bold>Themes were downloaded and extracted.</>'); | 
                                                        |
| 95 | - }  | 
                                                        |
| 96 | -}  | 
                                                        |
@@ -47,50 +47,3 @@  | 
                                                    ||
| 47 | 47 | ->setName(self::$defaultName)  | 
                                                        
| 48 | 48 |              ->setDescription('Downloads theme from configured storage.') | 
                                                        
| 49 | 49 | ->setHelp(<<<'EOT'  | 
                                                        
| 50 | -Location for themes archive can be defined by `THEMES_DOWNLOAD_URL` env variable.  | 
                                                        |
| 51 | -  | 
                                                        |
| 52 | -Themes must be packed into one compressed file (*.zip).  | 
                                                        |
| 53 | -Archive can be created with 'zip -r ../themes.zip *' command (called from your themes directory).  | 
                                                        |
| 54 | -  | 
                                                        |
| 55 | -Remember that themes must be located in their tenants directories. Example:  | 
                                                        |
| 56 | -  | 
                                                        |
| 57 | -123abc  | 
                                                        |
| 58 | - theme_1  | 
                                                        |
| 59 | - theme_2  | 
                                                        |
| 60 | -456def  | 
                                                        |
| 61 | - theme_3  | 
                                                        |
| 62 | -  | 
                                                        |
| 63 | -EOT);  | 
                                                        |
| 64 | - }  | 
                                                        |
| 65 | -  | 
                                                        |
| 66 | - protected function execute(InputInterface $input, OutputInterface $output): void  | 
                                                        |
| 67 | -    { | 
                                                        |
| 68 | -        if ('' === $this->themesUrl) { | 
                                                        |
| 69 | -            $output->writeln('<bg=red;options=bold>Themes archive url is empty.</>'); | 
                                                        |
| 70 | -  | 
                                                        |
| 71 | - return;  | 
                                                        |
| 72 | - }  | 
                                                        |
| 73 | - $client = new Client();  | 
                                                        |
| 74 | - $tempLocation = rtrim(sys_get_temp_dir(), '/').DIRECTORY_SEPARATOR.'themes.zip';  | 
                                                        |
| 75 | -  | 
                                                        |
| 76 | -        try { | 
                                                        |
| 77 | -            $client->request('GET', $this->themesUrl, ['sink' => $tempLocation]); | 
                                                        |
| 78 | -        } catch (ConnectException $e) { | 
                                                        |
| 79 | -            $output->writeln(sprintf("<bg=red;options=bold>Can't download themes package from '%s'.</>", $this->themesUrl)); | 
                                                        |
| 80 | - }  | 
                                                        |
| 81 | -  | 
                                                        |
| 82 | - $filesystem = new Filesystem();  | 
                                                        |
| 83 | -  | 
                                                        |
| 84 | - $zip = new \ZipArchive();  | 
                                                        |
| 85 | -        if (true === $zip->open($tempLocation)) { | 
                                                        |
| 86 | -            if (!$filesystem->exists($this->themesDirectory)) { | 
                                                        |
| 87 | - $filesystem->mkdir($this->themesDirectory);  | 
                                                        |
| 88 | - }  | 
                                                        |
| 89 | -  | 
                                                        |
| 90 | - $zip->extractTo($this->themesDirectory);  | 
                                                        |
| 91 | - $zip->close();  | 
                                                        |
| 92 | - }  | 
                                                        |
| 93 | -  | 
                                                        |
| 94 | -        $output->writeln('<bg=green;options=bold>Themes were downloaded and extracted.</>'); | 
                                                        |
| 95 | - }  | 
                                                        |
| 96 | -}  | 
                                                        |
@@ -47,50 +47,3 @@  | 
                                                    ||
| 47 | 47 | ->setName(self::$defaultName)  | 
                                                        
| 48 | 48 |              ->setDescription('Downloads theme from configured storage.') | 
                                                        
| 49 | 49 | ->setHelp(<<<'EOT'  | 
                                                        
| 50 | -Location for themes archive can be defined by `THEMES_DOWNLOAD_URL` env variable.  | 
                                                        |
| 51 | -  | 
                                                        |
| 52 | -Themes must be packed into one compressed file (*.zip).  | 
                                                        |
| 53 | -Archive can be created with 'zip -r ../themes.zip *' command (called from your themes directory).  | 
                                                        |
| 54 | -  | 
                                                        |
| 55 | -Remember that themes must be located in their tenants directories. Example:  | 
                                                        |
| 56 | -  | 
                                                        |
| 57 | -123abc  | 
                                                        |
| 58 | - theme_1  | 
                                                        |
| 59 | - theme_2  | 
                                                        |
| 60 | -456def  | 
                                                        |
| 61 | - theme_3  | 
                                                        |
| 62 | -  | 
                                                        |
| 63 | -EOT);  | 
                                                        |
| 64 | - }  | 
                                                        |
| 65 | -  | 
                                                        |
| 66 | - protected function execute(InputInterface $input, OutputInterface $output): void  | 
                                                        |
| 67 | -    { | 
                                                        |
| 68 | -        if ('' === $this->themesUrl) { | 
                                                        |
| 69 | -            $output->writeln('<bg=red;options=bold>Themes archive url is empty.</>'); | 
                                                        |
| 70 | -  | 
                                                        |
| 71 | - return;  | 
                                                        |
| 72 | - }  | 
                                                        |
| 73 | - $client = new Client();  | 
                                                        |
| 74 | - $tempLocation = rtrim(sys_get_temp_dir(), '/').DIRECTORY_SEPARATOR.'themes.zip';  | 
                                                        |
| 75 | -  | 
                                                        |
| 76 | -        try { | 
                                                        |
| 77 | -            $client->request('GET', $this->themesUrl, ['sink' => $tempLocation]); | 
                                                        |
| 78 | -        } catch (ConnectException $e) { | 
                                                        |
| 79 | -            $output->writeln(sprintf("<bg=red;options=bold>Can't download themes package from '%s'.</>", $this->themesUrl)); | 
                                                        |
| 80 | - }  | 
                                                        |
| 81 | -  | 
                                                        |
| 82 | - $filesystem = new Filesystem();  | 
                                                        |
| 83 | -  | 
                                                        |
| 84 | - $zip = new \ZipArchive();  | 
                                                        |
| 85 | -        if (true === $zip->open($tempLocation)) { | 
                                                        |
| 86 | -            if (!$filesystem->exists($this->themesDirectory)) { | 
                                                        |
| 87 | - $filesystem->mkdir($this->themesDirectory);  | 
                                                        |
| 88 | - }  | 
                                                        |
| 89 | -  | 
                                                        |
| 90 | - $zip->extractTo($this->themesDirectory);  | 
                                                        |
| 91 | - $zip->close();  | 
                                                        |
| 92 | - }  | 
                                                        |
| 93 | -  | 
                                                        |
| 94 | -        $output->writeln('<bg=green;options=bold>Themes were downloaded and extracted.</>'); | 
                                                        |
| 95 | - }  | 
                                                        |
| 96 | -}  | 
                                                        |
@@ -47,50 +47,3 @@  | 
                                                    ||
| 47 | 47 | ->setName(self::$defaultName)  | 
                                                        
| 48 | 48 |              ->setDescription('Downloads theme from configured storage.') | 
                                                        
| 49 | 49 | ->setHelp(<<<'EOT'  | 
                                                        
| 50 | -Location for themes archive can be defined by `THEMES_DOWNLOAD_URL` env variable.  | 
                                                        |
| 51 | -  | 
                                                        |
| 52 | -Themes must be packed into one compressed file (*.zip).  | 
                                                        |
| 53 | -Archive can be created with 'zip -r ../themes.zip *' command (called from your themes directory).  | 
                                                        |
| 54 | -  | 
                                                        |
| 55 | -Remember that themes must be located in their tenants directories. Example:  | 
                                                        |
| 56 | -  | 
                                                        |
| 57 | -123abc  | 
                                                        |
| 58 | - theme_1  | 
                                                        |
| 59 | - theme_2  | 
                                                        |
| 60 | -456def  | 
                                                        |
| 61 | - theme_3  | 
                                                        |
| 62 | -  | 
                                                        |
| 63 | -EOT);  | 
                                                        |
| 64 | - }  | 
                                                        |
| 65 | -  | 
                                                        |
| 66 | - protected function execute(InputInterface $input, OutputInterface $output): void  | 
                                                        |
| 67 | -    { | 
                                                        |
| 68 | -        if ('' === $this->themesUrl) { | 
                                                        |
| 69 | -            $output->writeln('<bg=red;options=bold>Themes archive url is empty.</>'); | 
                                                        |
| 70 | -  | 
                                                        |
| 71 | - return;  | 
                                                        |
| 72 | - }  | 
                                                        |
| 73 | - $client = new Client();  | 
                                                        |
| 74 | - $tempLocation = rtrim(sys_get_temp_dir(), '/').DIRECTORY_SEPARATOR.'themes.zip';  | 
                                                        |
| 75 | -  | 
                                                        |
| 76 | -        try { | 
                                                        |
| 77 | -            $client->request('GET', $this->themesUrl, ['sink' => $tempLocation]); | 
                                                        |
| 78 | -        } catch (ConnectException $e) { | 
                                                        |
| 79 | -            $output->writeln(sprintf("<bg=red;options=bold>Can't download themes package from '%s'.</>", $this->themesUrl)); | 
                                                        |
| 80 | - }  | 
                                                        |
| 81 | -  | 
                                                        |
| 82 | - $filesystem = new Filesystem();  | 
                                                        |
| 83 | -  | 
                                                        |
| 84 | - $zip = new \ZipArchive();  | 
                                                        |
| 85 | -        if (true === $zip->open($tempLocation)) { | 
                                                        |
| 86 | -            if (!$filesystem->exists($this->themesDirectory)) { | 
                                                        |
| 87 | - $filesystem->mkdir($this->themesDirectory);  | 
                                                        |
| 88 | - }  | 
                                                        |
| 89 | -  | 
                                                        |
| 90 | - $zip->extractTo($this->themesDirectory);  | 
                                                        |
| 91 | - $zip->close();  | 
                                                        |
| 92 | - }  | 
                                                        |
| 93 | -  | 
                                                        |
| 94 | -        $output->writeln('<bg=green;options=bold>Themes were downloaded and extracted.</>'); | 
                                                        |
| 95 | - }  | 
                                                        |
| 96 | -}  | 
                                                        |
@@ -47,50 +47,3 @@  | 
                                                    ||
| 47 | 47 | ->setName(self::$defaultName)  | 
                                                        
| 48 | 48 |              ->setDescription('Downloads theme from configured storage.') | 
                                                        
| 49 | 49 | ->setHelp(<<<'EOT'  | 
                                                        
| 50 | -Location for themes archive can be defined by `THEMES_DOWNLOAD_URL` env variable.  | 
                                                        |
| 51 | -  | 
                                                        |
| 52 | -Themes must be packed into one compressed file (*.zip).  | 
                                                        |
| 53 | -Archive can be created with 'zip -r ../themes.zip *' command (called from your themes directory).  | 
                                                        |
| 54 | -  | 
                                                        |
| 55 | -Remember that themes must be located in their tenants directories. Example:  | 
                                                        |
| 56 | -  | 
                                                        |
| 57 | -123abc  | 
                                                        |
| 58 | - theme_1  | 
                                                        |
| 59 | - theme_2  | 
                                                        |
| 60 | -456def  | 
                                                        |
| 61 | - theme_3  | 
                                                        |
| 62 | -  | 
                                                        |
| 63 | -EOT);  | 
                                                        |
| 64 | - }  | 
                                                        |
| 65 | -  | 
                                                        |
| 66 | - protected function execute(InputInterface $input, OutputInterface $output): void  | 
                                                        |
| 67 | -    { | 
                                                        |
| 68 | -        if ('' === $this->themesUrl) { | 
                                                        |
| 69 | -            $output->writeln('<bg=red;options=bold>Themes archive url is empty.</>'); | 
                                                        |
| 70 | -  | 
                                                        |
| 71 | - return;  | 
                                                        |
| 72 | - }  | 
                                                        |
| 73 | - $client = new Client();  | 
                                                        |
| 74 | - $tempLocation = rtrim(sys_get_temp_dir(), '/').DIRECTORY_SEPARATOR.'themes.zip';  | 
                                                        |
| 75 | -  | 
                                                        |
| 76 | -        try { | 
                                                        |
| 77 | -            $client->request('GET', $this->themesUrl, ['sink' => $tempLocation]); | 
                                                        |
| 78 | -        } catch (ConnectException $e) { | 
                                                        |
| 79 | -            $output->writeln(sprintf("<bg=red;options=bold>Can't download themes package from '%s'.</>", $this->themesUrl)); | 
                                                        |
| 80 | - }  | 
                                                        |
| 81 | -  | 
                                                        |
| 82 | - $filesystem = new Filesystem();  | 
                                                        |
| 83 | -  | 
                                                        |
| 84 | - $zip = new \ZipArchive();  | 
                                                        |
| 85 | -        if (true === $zip->open($tempLocation)) { | 
                                                        |
| 86 | -            if (!$filesystem->exists($this->themesDirectory)) { | 
                                                        |
| 87 | - $filesystem->mkdir($this->themesDirectory);  | 
                                                        |
| 88 | - }  | 
                                                        |
| 89 | -  | 
                                                        |
| 90 | - $zip->extractTo($this->themesDirectory);  | 
                                                        |
| 91 | - $zip->close();  | 
                                                        |
| 92 | - }  | 
                                                        |
| 93 | -  | 
                                                        |
| 94 | -        $output->writeln('<bg=green;options=bold>Themes were downloaded and extracted.</>'); | 
                                                        |
| 95 | - }  | 
                                                        |
| 96 | -}  | 
                                                        |
@@ -47,50 +47,3 @@  | 
                                                    ||
| 47 | 47 | ->setName(self::$defaultName)  | 
                                                        
| 48 | 48 |              ->setDescription('Downloads theme from configured storage.') | 
                                                        
| 49 | 49 | ->setHelp(<<<'EOT'  | 
                                                        
| 50 | -Location for themes archive can be defined by `THEMES_DOWNLOAD_URL` env variable.  | 
                                                        |
| 51 | -  | 
                                                        |
| 52 | -Themes must be packed into one compressed file (*.zip).  | 
                                                        |
| 53 | -Archive can be created with 'zip -r ../themes.zip *' command (called from your themes directory).  | 
                                                        |
| 54 | -  | 
                                                        |
| 55 | -Remember that themes must be located in their tenants directories. Example:  | 
                                                        |
| 56 | -  | 
                                                        |
| 57 | -123abc  | 
                                                        |
| 58 | - theme_1  | 
                                                        |
| 59 | - theme_2  | 
                                                        |
| 60 | -456def  | 
                                                        |
| 61 | - theme_3  | 
                                                        |
| 62 | -  | 
                                                        |
| 63 | -EOT);  | 
                                                        |
| 64 | - }  | 
                                                        |
| 65 | -  | 
                                                        |
| 66 | - protected function execute(InputInterface $input, OutputInterface $output): void  | 
                                                        |
| 67 | -    { | 
                                                        |
| 68 | -        if ('' === $this->themesUrl) { | 
                                                        |
| 69 | -            $output->writeln('<bg=red;options=bold>Themes archive url is empty.</>'); | 
                                                        |
| 70 | -  | 
                                                        |
| 71 | - return;  | 
                                                        |
| 72 | - }  | 
                                                        |
| 73 | - $client = new Client();  | 
                                                        |
| 74 | - $tempLocation = rtrim(sys_get_temp_dir(), '/').DIRECTORY_SEPARATOR.'themes.zip';  | 
                                                        |
| 75 | -  | 
                                                        |
| 76 | -        try { | 
                                                        |
| 77 | -            $client->request('GET', $this->themesUrl, ['sink' => $tempLocation]); | 
                                                        |
| 78 | -        } catch (ConnectException $e) { | 
                                                        |
| 79 | -            $output->writeln(sprintf("<bg=red;options=bold>Can't download themes package from '%s'.</>", $this->themesUrl)); | 
                                                        |
| 80 | - }  | 
                                                        |
| 81 | -  | 
                                                        |
| 82 | - $filesystem = new Filesystem();  | 
                                                        |
| 83 | -  | 
                                                        |
| 84 | - $zip = new \ZipArchive();  | 
                                                        |
| 85 | -        if (true === $zip->open($tempLocation)) { | 
                                                        |
| 86 | -            if (!$filesystem->exists($this->themesDirectory)) { | 
                                                        |
| 87 | - $filesystem->mkdir($this->themesDirectory);  | 
                                                        |
| 88 | - }  | 
                                                        |
| 89 | -  | 
                                                        |
| 90 | - $zip->extractTo($this->themesDirectory);  | 
                                                        |
| 91 | - $zip->close();  | 
                                                        |
| 92 | - }  | 
                                                        |
| 93 | -  | 
                                                        |
| 94 | -        $output->writeln('<bg=green;options=bold>Themes were downloaded and extracted.</>'); | 
                                                        |
| 95 | - }  | 
                                                        |
| 96 | -}  | 
                                                        |