public function install($tempPath, $moduleName)
    {
        //Check module dependecies
        $moduleDependency = $this->def($tempPath, 'require', true);
        if (!$moduleDependency = $this->checkDependency($moduleDependency))
            return false;

        //Move extracted module to modules path
        if (!$this->files->copyDirectory($tempPath, $this->path.'/'.$moduleName))
        {
            $this->errors->add('move_files_permission_denied', 'Permission denied in: '.$this->path.'/'.$moduleName);
            return false;
        }

        $this->buildAssets($moduleName);
        if (!$this->registerModule($moduleName))
        {
            $this->errors->add('register_module', 'Error in register module');
            return false;
        }
        return true;
    }
public function install($tempPath, $moduleName)
    {
        //Check module dependecies
        $moduleDependency = $this->def($tempPath, 'require', true);
        if (!$moduleDependency = $this->checkDependency($moduleDependency))
            return false;

        //Move extracted module to modules path
        if (!$this->files->copyDirectory($tempPath, $this->path.'/'.$moduleName))
        {
            $this->errors->add('move_files_permission_denied', 'Permission denied in: '.$this->path.'/'.$moduleName);
            return false;
        }

        $this->buildAssets($moduleName);
        if (!$this->registerModule($moduleName))
        {
            $this->errors->add('register_module', 'Error in register module');
            return false;
        }
        return true;
    }
public function install ( $ tempPath , $ moduleName ) { //Check module dependecies $ moduleDependency = $ this -> def ( $ tempPath , 'require' , true ) ; if ( ! $ moduleDependency = $ this -> checkDependency ( $ moduleDependency ) ) return false ; //Move extracted module to modules path if ( ! $ this -> files -> copyDirectory ( $ tempPath , $ this -> path . '/' . $ moduleName ) ) { $ this -> errors -> add ( 'move_files_permission_denied' , 'Permission denied in: ' . $ this -> path . '/' . $ moduleName ) ; return false ; } $ this -> buildAssets ( $ moduleName ) ; if ( ! $ this -> registerModule ( $ moduleName ) ) { $ this -> errors -> add ( 'register_module' , 'Error in register module' ) ; return false ; } return true ; }
Install module and build assets

@param string $moduleName
@param string path of module
@return bool
Install module and build assets