Пример #1
0
 public function languageAction()
 {
     $identificator = $this->params('language');
     $language = $this->languageService->getLanguageByIdentificator($identificator);
     $this->languageService->setCurrentLanguage($language);
     // Redirect back to the referer url
     $url = $this->request->getHeader('Referer')->getUri();
     return $this->redirect()->toUrl($url);
 }
Пример #2
0
    $service = new InvoiceService();
    $service->setCustomerService($sm->get('Application\\Service\\Customer'));
    $service->setSettingsService($sm->get('Application\\Service\\Settings'));
    $service->setArticleService($sm->get('Application\\Service\\Article'));
    $service->setCompanyService($sm->get('Application\\Service\\Company'));
    $service->setMailService($sm->get('Application\\Service\\Mail'));
    $service->setSupplierService($sm->get('Application\\Service\\Supplier'));
    return $service;
}, 'Application\\Service\\CreditInvoice' => function (ServiceManager $sm) {
    $service = new CreditInvoiceService();
    return $service;
}, 'Application\\Service\\Company' => function (ServiceManager $sm) {
    $service = new CompanyService();
    return $service;
}, 'Application\\Service\\Language' => function (ServiceManager $sm) {
    $service = new LanguageService();
    $service->setTranslator($sm->get('Translator'));
    return $service;
}, 'Application\\Service\\Mail' => function (ServiceManager $sm) {
    $service = new MailService();
    return $service;
}, 'Application\\Service\\Settings' => function (ServiceManager $sm) {
    $service = new SettingsService();
    return $service;
}, 'Application\\Service\\Statistics' => function (ServiceManager $sm) {
    $service = new StatisticsService();
    $service->setInvoiceService($sm->get('Application\\Service\\Invoice'));
    $service->setBankService($sm->get('Application\\Service\\Bank'));
    return $service;
}, 'Application\\Service\\Supplier' => function (ServiceManager $sm) {
    $service = new SupplierService();