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