[TYPO3-mvc] Re: extbase storagePid on CLI

Kim Lang k.lang at diefirma.de
Wed Oct 9 04:29:30 CEST 2013


i initialize the Repository with @inject:


    /**
     * postRepository
     *
     * @var \DF\DfWebthinking\Domain\Repository\PostRepository
     * @inject
     */
    protected $postRepository;

******************************************************************
and call getConfiguration in command action:

$this->settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'extkey');

Will not work.
otherwise initialize the repository without @inject via:

$postRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('DF\\Extkey\\Domain\\Repository\\PostRepository')

will work!


More information about the TYPO3-project-typo3v4mvc mailing list