App\Console\Commands\ThemeMake::fire PHP Method

fire() public method

Execute the console command.
public fire ( ) : boolean | null
return boolean | null
    public function fire()
    {
        // get plugin info
        $plugin = $this->getPlugin();
        $pluginClass = new ReflectionClass($plugin->getClass());
        $namespace = $pluginClass->getNamespaceName();
        // get theme info
        $path = $this->getPath();
        $themeClass = studly_case(str_replace('/', ' ', $path));
        $themeFile = $this->getThemeFile($plugin, $path, $themeClass);
        // path_to_theme_dir/Theme.php
        $themeId = $this->getThemeId($plugin, $themeClass);
        // myplugin@theme
        $themeTitle = $this->getThemeTitle();
        $description = $this->getThemeDescription($themeId, $plugin);
        $this->attr = compact('plugin', 'path', 'pluginClass', 'namespace', 'themeClass', 'themeFile', 'themeId', 'themeTitle', 'description');
        // print and confirm the information of theme
        if ($this->confirmInfo() === false) {
            return false;
        }
        try {
            $this->copyThemeDirectory();
            $this->makeThemeClass();
            // composer.json 파일 수정
            if ($this->registerTheme() === false) {
                throw new \Exception('Writing to composer.json file was failed.');
            }
            $this->runComposerDump($plugin->getPath());
        } catch (\Exception $e) {
            $this->clean();
            throw $e;
        }
        $this->info("Theme is created successfully.");
        //$this->info("See ./plugins/$name directory. And open $url in your browser.");
        //$this->info("Input and modify your plugin information in ./plugins/$name/composer.json file.");
    }