Esempio n. 1
0
 public function getComponent()
 {
     $mainComponent = ComponentFactory::getComponent(ContainerComponent::class);
     $mainComponent->setTitle('Summary');
     $mainComponent->setHtmlClass('component-block');
     return $mainComponent;
 }
Esempio n. 2
0
 public function getStaticComponent($action = null)
 {
     $template = $this->getStaticContentTemplate($action);
     $staticComponent = ComponentFactory::getComponent(StaticComponent::class);
     $staticComponent->setTemplate($template);
     return $staticComponent;
 }
Esempio n. 3
0
 public function run()
 {
     $this->component = ComponentFactory::getComponent(FinOperationComponent::class);
     $this->component->setName('incomeComponent');
     $this->component->init();
     $model = $this->getModel();
     $addedIncome = $this->component->readAddedOperation();
     if ($addedIncome) {
         $model->addIncome($addedIncome);
     }
     $this->component->populateFinOperationTable($model->getIncome());
     $this->component->setTotalAmount($model->getIncomeSum());
     $this->component->setDailyAvg($model->getDailyAverage());
     $this->component->setTitle("Income");
 }
Esempio n. 4
0
 public function __construct()
 {
     parent::__construct();
     $this->addChild(ComponentFactory::getComponent(HtmlHead::class));
 }
Esempio n. 5
0
 protected function initPresenter()
 {
     return ComponentFactory::getComponent(HtmlPresenter::class);
 }
Esempio n. 6
0
 private function getDailyAvgComponent()
 {
     $textComponent = ComponentFactory::getComponent(TextComponent::class);
     $textComponent->setName($this->name . 'dailyAvg');
     return $textComponent;
 }