[TYPO3-mvc] 6.2 session handling

Bjoern Haverland mrwhy at arcor.de
Sun May 11 20:09:46 CEST 2014


Hi Jacco,

occurs the error in the calling controller or directly in the 
repository? How does your controller inject the repository?

Greetz

Björn

Am 11.05.2014 18:56, schrieb Jacco van der Post:
> I tried the following in a repository, but just keep getting
>
> Fatal Error: Argument 1 passed to 
> TYPO3\CMS\Extbase\Persistence\Repository::__construct() must implement 
> interface TYPO3\CMS\Extbase\Object\ObjectManagerInterface, none given
>
>
>
>   /**
>      * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
>      */
>     protected $objectManager;
>
>     /**
>      * The session handler
>      * @var Tx_Jpadvisor_Domain_Session_SessionHandler
>      */
>     protected $sessionHandler;
>
>     /**
>      * Injects the object manager
>      *
>      * @param \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager
>      * @return void
>      */
>     public function 
> injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManager 
> $objectManager) {
>         $this->objectManager = $objectManager;
>         $this->sessionHandler = 
> $this->objectManager->get('Tx_Jpadvisor_Domain_Session_SessionHandler');
>     }
>



More information about the TYPO3-project-typo3v4mvc mailing list