I have a Typo3 Extension (Typo3 CMS 6.2) and I want to access the repository globalSettingsRepository
from a PHP file which is located in /Resource/PHP/.
The dependency injection does not work although I cleared the cache:
/**
* globalSettingsRepository
*
* @var \TYPO3\Institutsvideoverwaltung\Domain\Repository\GlobalSettingsRepository
* @inject
*/
public $globalSettingsRepository = NULL;
The namespace of the PHP is the same as my controllers.
I have also tried this in order to create an instance of the globalSettingsRepository:
$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
Which does not work either because /TYPO3/CMS/... was not found.
Does anyone have a solution? Is there even a way to access a repository from /Resources?
Thanks alot.