Overview

Namespaces

  • Budovy
  • Kdyby
    • BootstrapFormRenderer
      • DI
      • Latte
  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Diagnostics
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
      • Diagnostics
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • PhpGenerator
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
  • NetteModule
  • Nextras
    • Datagrid
  • None
  • PHP
  • Tester
    • CodeCoverage
    • Runner
      • Output
  • Vodacek
    • Forms
      • Controls
  • WebLoader
    • Filter
    • Nette

Classes

  • AuthorizeScheduledTaskFactory
  • AuthorizeScheduledTaskPresenter
  • BasePresenter
  • BreakdownFactory
  • BreakdownPresenter
  • BreakdownRepository
  • BreakdownStatisticFactory
  • BreakdownStatisticPresenter
  • ContactBindingFactory
  • ContactbindingPresenter
  • ContactBindingRepository
  • ContactFactory
  • ContactPresenter
  • ContactRepository
  • DocumentFactory
  • DocumentPresenter
  • DocumentRepository
  • DocumentsDatagrid
  • DocumenttypeFactory
  • DocumenttypePresenter
  • DocumenttypeRepository
  • DownloadPresenter
  • EmailPresenter
  • ErrorPresenter
  • HomepagePresenter
  • OperationFactory
  • OperationPresenter
  • OperationRepository
  • PeriodicTaskFactory
  • PeriodicTaskPresenter
  • PeriodicTaskRealizationFactory
  • PeriodicTaskRealizationPresenter
  • PeriodicTaskRealizationRepository
  • PeriodicTaskRepository
  • PeriodicTaskStatisticFactory
  • PeriodicTaskStatisticPresenter
  • PlaceFactory
  • PlacePresenter
  • PlaceRepository
  • PriorityFactory
  • PriorityPresenter
  • PriorityRepository
  • Repository
  • RoleRepository
  • RouterFactory
  • ScheduledTaskFactory
  • ScheduledTaskPresenter
  • ScheduledTaskRealizationFactory
  • ScheduledTaskRealizationPresenter
  • ScheduledTaskRealizationRepository
  • ScheduledTaskRepository
  • ScheduledTaskStatisticFactory
  • ScheduledTaskStatisticPresenter
  • SignPresenter
  • UnitFactory
  • UnitPresenter
  • UnitRepository
  • UserFactory
  • UserManager
  • UserPresenter
  • UserRepository
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: namespace Budovy;
 3: 
 4: class ScheduledTaskStatisticPresenter extends BasePresenter {
 5:     /** @var ScheduledTaskRealizationRepository @inject */
 6:     public $scheduledTaskRealizationRepository;
 7: 
 8:     /** @var ScheduledTaskStatisticFactory @inject */
 9:     public $scheduledTaskStatisticFactory;
10: 
11:     function actionDefault() {
12:         $start = new \DateTime();
13:         $start->setTimestamp(mktime(0, 0, 0, 1, 1, date('Y')));
14: 
15:         $this['filterForm']->setDefaults(array('start' => $start, 'end' => new \DateTime()));
16:     }
17: 
18:     protected function createComponentFilterForm() {
19:         $form = $this->scheduledTaskStatisticFactory->createFilterForm();
20:         $form->onSuccess[] = $this->displayStatistic;
21: 
22:         return $form;
23:     }
24: 
25:     function displayStatistic($form) {
26:         $fdata = $form->getValues();
27: 
28:         $this->template->pricestatistic = $this->scheduledTaskRealizationRepository->getPriceStatistic($fdata->start->format('Y-m-d'), $fdata->end->format('Y-m-d'), $fdata->id_place);
29:         $this->template->unitstatistic = $this->scheduledTaskRealizationRepository->getUnitStatistic($fdata->start->format('Y-m-d'), $fdata->end->format('Y-m-d'), $fdata->id_place);
30:         $this->template->operationstatistic = $this->scheduledTaskRealizationRepository->getOperationStatistic($fdata->start->format('Y-m-d'), $fdata->end->format('Y-m-d'), $fdata->id_place);
31:         $this->template->contactstatistic = $this->scheduledTaskRealizationRepository->getContactStatistic($fdata->start->format('Y-m-d'), $fdata->end->format('Y-m-d'), $fdata->id_place);
32:     }
33: }
API documentation generated by ApiGen 2.8.0