次のような commandController を取得しました (TYPO3 6.1 を使用):
class MyCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandController {
/**
* fileRepository
*
* @var \VENDOR\MyExt\Domain\Repository\FileRepository
* @inject
*/
protected $fileRepository;
}
しかし、キャストしようとすると
$this->fileRepository->findAll();
私は得る:
Fatal error: Call to a member function findAll() on a non-object in
リポジトリは、ActionControllers のように @inject で自動注入されていないようです。
リポジトリを手動で挿入するにはどうすればよいですか?