Example #1
0
 public function getComponent()
 {
     $mainComponent = ComponentFactory::getComponent(ContainerComponent::class);
     $mainComponent->setTitle('Summary');
     $mainComponent->setHtmlClass('component-block');
     return $mainComponent;
 }
Example #2
0
 public function getStaticComponent($action = null)
 {
     $template = $this->getStaticContentTemplate($action);
     $staticComponent = ComponentFactory::getComponent(StaticComponent::class);
     $staticComponent->setTemplate($template);
     return $staticComponent;
 }
Example #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");
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     $this->addChild(ComponentFactory::getComponent(HtmlHead::class));
 }
Example #5
0
 protected function initPresenter()
 {
     return ComponentFactory::getComponent(HtmlPresenter::class);
 }
Example #6
0
 private function getDailyAvgComponent()
 {
     $textComponent = ComponentFactory::getComponent(TextComponent::class);
     $textComponent->setName($this->name . 'dailyAvg');
     return $textComponent;
 }