コード例 #1
0
 public function toArray()
 {
     $themes = $this->_collectionThemeFactory->create();
     $file = $this->_filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath('design/frontend/');
     $vesPackagePaths = glob($file . '*/*/config.xml');
     $output = [];
     foreach ($vesPackagePaths as $k => $v) {
         $v = str_replace("/config.xml", "", $v);
         $output[str_replace($file, "", $v)] = ucfirst(str_replace($file, "", $v));
     }
     return $output;
 }
コード例 #2
0
ファイル: Data.php プロジェクト: rustamveer/magento2
 public function getExportPackages()
 {
     $themes = $this->_collectionThemeFactory->create();
     $file = $this->_filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath('design/frontend/');
     $vesPackagePaths = glob($file . '*/config.xml');
     $output = [];
     foreach ($vesPackagePaths as $k => $v) {
         $v = str_replace("config.xml", "", $v);
         $themes = array_filter(glob($v . '*'), 'is_dir');
         foreach ($themes as $k => $v) {
             $output[] = array('label' => ucfirst(str_replace($file, "", $v)), 'value' => str_replace($file, "", $v));
         }
     }
     return $output;
 }