コード例 #1
0
     			$toFiles[] = 'app/etc/modules/'.$capNamespace.'_'.$capModuleadmin.'.xml';
     			$toFiles[] = 'app/code/local/'.$capNamespace.'/'.$capModuleadmin.'/Block/'.$capModule.'.php';
     			$toFiles[] = 'app/code/local/'.$capNamespace.'/'.$capModuleadmin.'/Block/'.$capModule.'/Edit.php';
     			$toFiles[] = 'app/code/local/'.$capNamespace.'/'.$capModuleadmin.'/Block/'.$capModule.'/Grid.php';
     			$toFiles[] = 'app/code/local/'.$capNamespace.'/'.$capModuleadmin.'/Block/'.$capModule.'/Edit/Form.php';
     			$toFiles[] = 'app/code/local/'.$capNamespace.'/'.$capModuleadmin.'/Block/'.$capModule.'/Edit/Tabs.php';
     			$toFiles[] = 'app/code/local/'.$capNamespace.'/'.$capModuleadmin.'/Block/'.$capModule.'/Edit/Tab/Form.php';
     			$toFiles[] = 'app/code/local/'.$capNamespace.'/'.$capModuleadmin.'/controllers/'.$capModule.'Controller.php';
     			$toFiles[] = 'app/code/local/'.$capNamespace.'/'.$capModuleadmin.'/Helper/Data.php';
     * 
     */
 }
 if (isset($_POST['create'])) {
     if (!empty($module) && !empty($namespace)) {
         copyBlankoFiles($fromFiles, $toFiles, $shop);
         insertCustomVars($toFiles, $shop);
         $message = '<div id="message"><p><strong>New Module successfully created!</strong></p>
     		<p>Go to the folder where this file is located. You\'ll find a new folder called \'new\'.</p>
     		<p>Within are all required files for your new module. This folder has the same structure as your Magento Installation.
     		Just make sure you replace the \'interface\' and \'theme\' folder with your current design path. If you want to add custom
     		DB-fields go to /new/local/' . $capNamespace . '/' . $capModule . '/sql/module_setup/mysql4-install-0.1.0.php
     		and make your changes for line 12 to 14.</p><p>Copy /new/' . $capNamespace . '_' . $capModule . '.xml to /app/etc/modules/. If you
     		chose a Magento Install dir, all files can be found in their according directory.
     		Implement your module functionallity and you\'re done!</p>
     		<p><strong>List of created files:</strong></p>';
         foreach ($toFiles as $file) {
             $message .= '<p class="file">' . $file . '</p>';
         }
         $message .= '</div>';
     } else {
         $message = '<div id="message"><p>Please fill out out required fields.</p></div>';
コード例 #2
0
     }
 }
 $class = TEMPLATES_DIR . '_' . $_POST['template'] . '_Config';
 if (class_exists($class)) {
     $config = new $class();
     $config->setVars($vars);
     $fromFiles = $config->getFromFiles();
     $toFiles = $config->getToFiles();
 } else {
     throw new Exception('No Config.php found for selected skeleton template: ' . $template);
 }
 if (isset($_POST['create'])) {
     if (!empty($module) && !empty($namespace) && !empty($formBddTable)) {
         clearCache();
         copyBlankoFiles($fromFiles, $toFiles, $shop);
         insertCustomVars($toFiles, $shop, $formBddTable);
         $message = '<div id="message"><p><strong>New Module successfully created!</strong></p>
     		<p><strong>List of created files:</strong></p>';
         foreach ($toFiles as $file) {
             $message .= '<p class="file">' . $file . '</p>';
         }
         $message .= '</div>';
     } else {
         $message = '<div id="message"><p>Please fill out all required fields.</p></div>';
     }
 }
 if (isset($_POST['uninstall'])) {
     $modulePath = 'app/code/local/' . $vars['capNamespace'] . '/' . $vars['capModule'] . '/';
     if (uninstallModule($shop, $modulePath, $toFiles, $vars) === true) {
         clearCache();
         $message = '<div id="message"><p><strong>Module successfully uninstalled!</strong></p></div>';