| 1 | <?php  | 
            ||
| 10 | class HubicController extends ActionController  | 
            ||
| 11 | { | 
            ||
| 12 | /**  | 
            ||
| 13 | * @var \Filoucrackeur\Hubic\Service\HubicService  | 
            ||
| 14 | */  | 
            ||
| 15 | protected $hubicService;  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * @var \Filoucrackeur\Hubic\Domain\Repository\AccountRepository  | 
            ||
| 19 | */  | 
            ||
| 20 | protected $accountRepository;  | 
            ||
| 21 | |||
| 22 | public function listAction()  | 
            ||
| 23 |     { | 
            ||
| 24 | /** @var Account $account */  | 
            ||
| 25 | $account = $this->accountRepository->findByIdentifier($this->settings['account']);  | 
            ||
| 26 |         if ($account) { | 
            ||
| 27 | $this->hubicService->setAccount($account);  | 
            ||
| 28 |             $this->view->assign('links', $this->hubicService->getAllLinks()); | 
            ||
| 29 | }  | 
            ||
| 30 | }  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * @param AccountRepository $accountRepository  | 
            ||
| 34 | */  | 
            ||
| 35 | public function injectAccountRepository(AccountRepository $accountRepository)  | 
            ||
| 39 | |||
| 40 | /**  | 
            ||
| 41 | * @param HubicService $hubicService  | 
            ||
| 42 | */  | 
            ||
| 43 | public function injectHubicService(HubicService $hubicService)  | 
            ||
| 47 | }  | 
            ||
| 48 |