public function onAttachProject()
    {
        try {
            if (!$projectId = trim(post('project_id'))) {
                throw new ApplicationException(Lang::get('system::lang.project.id.missing'));
            }

            $manager = UpdateManager::instance();
            $result = $manager->requestProjectDetails($projectId);

            Parameter::set([
                'system::project.id'    => $projectId,
                'system::project.name'  => $result['name'],
                'system::project.owner' => $result['owner'],
            ]);

            return $this->onForceUpdate();
        }
        catch (Exception $ex) {
            $this->handleError($ex);
            return $this->makePartial('project_form');
        }
    }
public function onAttachProject()
    {
        try {
            if (!$projectId = trim(post('project_id'))) {
                throw new ApplicationException(Lang::get('system::lang.project.id.missing'));
            }

            $manager = UpdateManager::instance();
            $result = $manager->requestProjectDetails($projectId);

            Parameter::set([
                'system::project.id'    => $projectId,
                'system::project.name'  => $result['name'],
                'system::project.owner' => $result['owner'],
            ]);

            return $this->onForceUpdate();
        }
        catch (Exception $ex) {
            $this->handleError($ex);
            return $this->makePartial('project_form');
        }
    }
public function onAttachProject ( ) { try { if ( ! $ projectId = trim ( post ( 'project_id' ) ) ) { throw new ApplicationException ( Lang :: get ( 'system::lang.project.id.missing' ) ) ; } $ manager = UpdateManager :: instance ( ) ; $ result = $ manager -> requestProjectDetails ( $ projectId ) ; Parameter :: set ( [ 'system::project.id' => $ projectId , 'system::project.name' => $ result [ 'name' ] , 'system::project.owner' => $ result [ 'owner' ] , ] ) ; return $ this -> onForceUpdate ( ) ; } catch ( Exception $ ex ) { $ this -> handleError ( $ ex ) ; return $ this -> makePartial ( 'project_form' ) ; } }
Validate the project ID and execute the project installation
Validate the project ID and execute the project installation