original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Install module and build assets
  
  @param string $moduleName
  @param string path of module
  @return bool
docstring_tokens: Install module and build assets