public function createModule(Module $module)
    {
        $dst = $this->rootDir.'/../src/Terrific/Module/'.StringUtils::camelize($module->getName());

        if($this->toolbarMode === ToolbarListener::DEMO) {
            // prevent module creation in demo mode
            throw new \Exception('This action is not supported in demo mode');
        } else {
            if($this->moduleTemplate) {
                $this->copy($this->moduleTemplate, $dst, $module);
            }

            $this->copy($this->defaultTemplate, $dst, $module);
        }
    }
public function createModule(Module $module)
    {
        $dst = $this->rootDir.'/../src/Terrific/Module/'.StringUtils::camelize($module->getName());

        if($this->toolbarMode === ToolbarListener::DEMO) {
            // prevent module creation in demo mode
            throw new \Exception('This action is not supported in demo mode');
        } else {
            if($this->moduleTemplate) {
                $this->copy($this->moduleTemplate, $dst, $module);
            }

            $this->copy($this->defaultTemplate, $dst, $module);
        }
    }
public function createModule ( Module $ module ) { $ dst = $ this -> rootDir . '/../src/Terrific/Module/' . StringUtils :: camelize ( $ module -> getName ( ) ) ; if ( $ this -> toolbarMode === ToolbarListener :: DEMO ) { // prevent module creation in demo mode throw new \ Exception ( 'This action is not supported in demo mode' ) ; } else { if ( $ this -> moduleTemplate ) { $ this -> copy ( $ this -> moduleTemplate , $ dst , $ module ) ; } $ this -> copy ( $ this -> defaultTemplate , $ dst , $ module ) ; } }
Creates a Terrific Module

@param Module $module The module to create
Creates a Terrific Module