[TYPO3-mvc] static_info_tables / injectCountryRepository

Sebastian Zarges sebastian.zarges at ewikon.com
Wed Jul 15 11:03:01 CEST 2015


Hello,
I'm new in Typo3 and trying to integrate a country selection in an Extbase extension fluid form.

I've followed the steps descriped in the Static Info Tables manual, but the the country data isn't injected into the var "$this->countryRepository", the public function "injectCountryRepository" of my controller class seems to be never called.

Added to my controller class:
/**
 * @var \SJBR\StaticInfoTables\Domain\Repository\CountryRepository
 */
 protected $countryRepository;

/**
 * Dependency injection of the Country Repository
 *
 * @param \SJBR\StaticInfoTables\Domain\Repository\CountryRepository $countryRepository
 * @return void
 */
 public function injectCountryRepository(\SJBR\StaticInfoTables\Domain\Repository\CountryRepository $countryRepository) {
        $this->countryRepository = $countryRepository;
}

---------

Added to my action:
$countries = $this->countryRepository->findAll();
$this->view->assign('countries', $countries);

---------

What is to do to get the injection working?

Thanks in advance

cya


More information about the TYPO3-project-typo3v4mvc mailing list