[TYPO3-mvc] Scheduler - Extbase repository

Stefan Kruse besucher80 at gmx.de
Tue Jul 9 09:32:10 CEST 2013


> I'm trying to get an instance of a repository from within the execute
function of a scheduler task.
> Below is what I've done - with no luck. Don't know what i'm missing, but
hope someone can help.
> $this->objectManager =
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\O
bject\\ObjectManager');
> $this->mediaRepository =
$this->objectManager->get('TYPOCONSULT\\TcMediaPlayer\\Domain\\Repository\\M
ediaRepository');


Hi Peter, hi Domi,

This is exactly what Im done, too. I'm trying to get an instance of a
repository to validate a tca field. I need to check if a username is already
in DB.

$this->objectManager =
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\O
bject\\ObjectManager');
$this->companyRepository =
$this->objectManager->get('SK\\Tl24\\Domain\\Repository\\CompanyRepository')
;
$companies = $this->companyRepository->findAll();

$companies is every time NULL.

I try to set the configuration, but this doesn't work for me.

Do you get it work, Peter? You have maybe a tipp what I cant try?

Thanks Stefam



More information about the TYPO3-project-typo3v4mvc mailing list