/** * List Command * * @return void */ public function listCommand() { $repositories = $this->driverComposite->getRepositories(); foreach ($repositories as $repository) { $this->outputLine($repository->getRepositoryUrl()); } }
/** * @return void */ public function listAction() { try { $this->view->assign('repositories', $this->driverComposite->getRepositories()); } catch (\Lightwerk\SurfCaptain\Service\Exception $e) { $this->handleException($e); } catch (\Lightwerk\SurfCaptain\GitApi\Exception $e) { $this->handleException($e); } catch (\TYPO3\Flow\Http\Exception $e) { $this->handleException($e); } }
/** * Returns the form definitions for the step * * @param \TYPO3\Form\Core\Model\FormDefinition $formDefinition * @return void */ protected function buildForm(\TYPO3\Form\Core\Model\FormDefinition $formDefinition) { $page1 = $formDefinition->createPage('page1'); $page1->setRenderingOption('header', 'Verification Git Configuration'); $verificationSection = $page1->createElement('verificationSection', 'TYPO3.Form:Section'); $verificationSection->setLabel('Tried to fetch your git repositories.'); $result = $verificationSection->createElement('result', 'TYPO3.Form:StaticText'); try { $repositories = $this->driverComposite->getRepositories(); $result->setProperty('text', 'Success: found ' . count($repositories) . ' repositories'); $result->setProperty('elementClassAttribute', 'alert alert-success'); } catch (\Lightwerk\SurfCaptain\Exception $e) { $result->setProperty('text', 'Failed with error ' . $e->getMessage() . ' - ' . $e->getCode()); $result->setProperty('elementClassAttribute', 'alert alert-error'); } catch (\TYPO3\Flow\Http\Exception $e) { $result->setProperty('text', 'Failed with error ' . $e->getMessage() . ' - ' . $e->getCode()); $result->setProperty('elementClassAttribute', 'alert alert-error'); } }