[TYPO3-mvc] [TYPO3 6.1beta1] Using a repository in a service...

Xavier Perseguers xavier at typo3.org
Thu Dec 5 16:48:56 CET 2013


Hi,

> /**
>  * frontendUserRepository
>  *
>  * @var \TYPO3\Dkmbydel\Domain\Repository\FrontendUserRepository

add @inject on a new line, empty cache and try again, this should work
automagically

>  */
> protected $frontendUserRepository;

[...]

> I then tried to instantiate the object manually by:
> $user =
> \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\Dkmbydel\Domain\Repository\FrontendUserRepository');

You should use Extbase's object manager when you work with Extbase, not
the standard TYPO3 way of instantiating class instances.

Kind regards

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org



More information about the TYPO3-project-typo3v4mvc mailing list