コード例 #1
0
ファイル: SummaryModule.php プロジェクト: doomy/wallet
 public function getComponent()
 {
     $mainComponent = ComponentFactory::getComponent(ContainerComponent::class);
     $mainComponent->setTitle('Summary');
     $mainComponent->setHtmlClass('component-block');
     return $mainComponent;
 }
コード例 #2
0
ファイル: StaticModule.php プロジェクト: doomy/central
 public function getStaticComponent($action = null)
 {
     $template = $this->getStaticContentTemplate($action);
     $staticComponent = ComponentFactory::getComponent(StaticComponent::class);
     $staticComponent->setTemplate($template);
     return $staticComponent;
 }
コード例 #3
0
ファイル: IncomeModule.php プロジェクト: doomy/wallet
 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");
 }
コード例 #4
0
ファイル: HtmlPresenter.php プロジェクト: doomy/central
 public function __construct()
 {
     parent::__construct();
     $this->addChild(ComponentFactory::getComponent(HtmlHead::class));
 }
コード例 #5
0
ファイル: Controller.php プロジェクト: doomy/central
 protected function initPresenter()
 {
     return ComponentFactory::getComponent(HtmlPresenter::class);
 }
コード例 #6
0
 private function getDailyAvgComponent()
 {
     $textComponent = ComponentFactory::getComponent(TextComponent::class);
     $textComponent->setName($this->name . 'dailyAvg');
     return $textComponent;
 }