[TYPO3-mvc] Is it possible to have a model in a subnamespace
Florian Rival
contact at oktopuce.fr
Mon Nov 18 10:46:26 CET 2013
Hi Philipp,
I think that with the namespaces and the autoloader you can add as many
sub-directories as you want in your extension.
The autoloader tells extbase where to find your extensions' classes if
the pattern is different from the one it already know.
This is an example of autoloader (ext_autoload.php) - from blog example :
<?php
$extensionClassesPath = t3lib_extMgm::extPath('blog_example') . 'Classes/';
return array(
'tx_blogexample_viewhelpers_abstractbackendviewhelper' =>
$extensionClassesPath . 'ViewHelpers/AbstractBackendViewHelper.php',
'tx_blogexample_domain_model_blog' => $extensionClassesPath .
'Domain/Model/Blog.php',
'tx_blogexample_controller_postcontroller' => $extensionClassesPath
. 'Controller/PostController.php'
);
?>
Regards,
Florian RIVAL
www.oktopuce.fr <http://www.oktopuce.fr/>
P*Please consider the environment before printing this email
*
Le 15/11/2013 16:09, Philipp a écrit :
> Hey,
>
> my extension is getting a little big, is it possible to have a
> subnamespace withing the domainconcept?
>
> Such as:
>
> Domain\Model\Import\Report
> Domain\Model\Detail\ResourceDetail
>
> Domain\Repository\Import\ReportRepository
> Domain\Repository\Detail\ResourceDetailRepository
>
> And also for Controllers....
>
> Or can i configure this via typoscript?
> tx_extbase.classes.Vendor\Extension\Controller\ReportController =
> Vendor\Extension\Controller\Import\ReportController
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list