Commit dd59c75d authored by Markus Sommer's avatar Markus Sommer
Browse files

[TASK] Add content element data and refactor code

parent f6bad9f3
...@@ -14,19 +14,34 @@ namespace T3o\Randombanners\Controller; ...@@ -14,19 +14,34 @@ namespace T3o\Randombanners\Controller;
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
class BannerController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { use T3o\Randombanners\Domain\Repository\BannerRepository;
/** /**
* @var \T3o\Randombanners\Domain\Repository\BannerRepository * Class BannerController
* @inject * @package T3o\Randombanners\Controller
*/ */
class BannerController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* @var BannerRepository
* */
protected $bannerRepository; protected $bannerRepository;
/** /**
* @return void * @return void
*/ */
public function indexAction() { public function indexAction()
{
$banners = $this->bannerRepository->findAll(); $banners = $this->bannerRepository->findAll();
$this->view->assign('banners', $banners); $this->view->assign('banners', $banners);
$this->view->assign('contentData', $this->configurationManager->getContentObject()->data);
}
/**
* @param BannerRepository $bannerRepository
*/
public function injectBannerRepository(BannerRepository $bannerRepository)
{
$this->bannerRepository = $bannerRepository;
} }
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment