[TYPO3-mvc] writing backend module

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Tue Feb 7 19:01:47 CET 2012


Hi Alex

I instantiated, now changed to injection:
	/**
	* @var Tx_PsoaAccredit_Domain_Repository_AccreditationRepository
	*/
	protected $accreditationRepository;
	/**
	 * @var Tx_PsoaAccredit_Domain_Repository_PersonRepository
	 */
	protected $personRepository;
	/**
	 * @var Tx_PsoaAccredit_Domain_Repository_PassportRepository;
	 */
	protected $passportRepository;
	
	/**
	* @param Tx_PsoaAccredit_Domain_Repository_AccreditationRepository
$accreditationRepository
	* @return void
	*/
	public function
injectAccreditationRepository(Tx_PsoaAccredit_Domain_Repository_Accreditatio
nRepository $accreditationRepository){ 
		$this->accreditationRepository = $accreditationRepository;
	}
	/**
	 * @param Tx_PsoaAccredit_Domain_Repository_PersonRepository
$personRepository
	 * @return void
	 */
	public function
injectPersonRepository(Tx_PsoaAccredit_Domain_Repository_PersonRepository
$personRepository){
		$this->personRepository = $personRepository;
	}
	/**
	* @param Tx_PsoaAccredit_Domain_Repository_PassportRepository
$passportRepository
	* @return void
	*/
	public function
injectPassportRepository(Tx_PsoaAccredit_Domain_Repository_PassportRepositor
y $passportRepository) {
		$this->passportRepository = $passportRepository;
	}
	
	
	/**
	 * Initializes the current action
	 *
	 * @return void
	 */
	protected function initializeAction() {
		$path = t3lib_extMgm::siteRelPath("psoa_accredit") .
"Resources/Public";
		$this->response->addAdditionalHeaderData('<link
rel="stylesheet" type="text/css" href="' . $path .
'/css/tx_psoaaccredit_backend.css"/>');
		$configurationManager =
t3lib_div::makeInstance('Tx_Extbase_Configuration_BackendConfigurationManage
r');
		$this->settings =
$configurationManager->getConfiguration($this->request->getControllerExtensi
onName(),$this->request->getPluginName());
	}

But this also did not help :-( - Some more ideas?

Best regards
Johannes


-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Alexander Dick
Gesendet: Dienstag, 7. Februar 2012 18:32
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc] writing backend module

Am 07.02.2012 18:04, schrieb Johannes C. Schulz - EnzephaloN IT-Solutions:
> Hello Alexander
>
> Yes, of curse:
>
> plugin.tx_psoaaccredit{
> 	settings{
> [...]
> 	}
> 	persistence{
> 		storagePid =
> {$plugin.tx_psoaaccredit.persistence.storagePid}
> [...]
>
> module.tx_psoaaccredit{
> 	settings<  plugin.tx_psoaaccredit.settings
> 	persistence<  plugin.tx_psoaaccredit.persistence
> }

Looks OK to me, do you inject or instantiate the accreditationRepository in
your BackendController?


	/**
	 * @var Tx_Xxx_Domain_Repository_AccreditationRepository
	 */
	protected $accreditationRepository;

	/**
	 * @param Tx_Xxx_Domain_Repository_AccreditationRepository 
$accreditationRepository
	 * @return void
	 */
	public function 
injectAccreditationRepository(Tx_Xxx_Domain_Repository_AccreditationReposito
ry 
  $accreditationRepository) {
		$this->accreditationRepository = $accreditationRepository;
	}

make sure to clear the cache after that change!

Kind regards
Alex

>
> Best regards
> Johannes
>
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
> Alexander Dick
> Gesendet: Dienstag, 7. Februar 2012 17:57
> An: typo3-project-typo3v4mvc at lists.typo3.org
> Betreff: Re: [TYPO3-mvc] writing backend module
>
> Hi,
>
>> But “findAll()” doesn’t find anything!
>
> Have you set your storagePid ?
>
> TS Config:
>
> module.tx_xxx.persistence.storagePid = 2
>
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
>

_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc




More information about the TYPO3-project-typo3v4mvc mailing list