<?php


namespace App\FrontModule\Presenters;


use App\Components\DataGrids\Factories\IGamesDataGridFactory;
use App\Components\DataGrids\GamesDataGrid;

class GamesPresenter extends FrontBasePresenter
{
    /** @var  IGamesDataGridFactory */
    protected $dataGridFactory;

    /**
     * @param IGamesDataGridFactory $dataGridFactory
     */
    public function injectDataGrids(IGamesDataGridFactory $dataGridFactory)
    {
        $this->dataGridFactory = $dataGridFactory;
    }

    public function actionList()
    {
    	$this->pageHeader = 'Games list';
    }

    /**
     * @return GamesDataGrid
     */
    protected function createComponentGamesGrid() : GamesDataGrid
    {
        return $this->dataGridFactory->create();
    }
}