blog.Resource

Archive:

News-Feeds:


RSS 2.0
RSS 0.91
RDF
ATOM 0.3
June 29, 2013

Extbase files in subfolders

Category: Extbase

Did you ever face long lists of controllers in the Controller directory of your extension? Bring some structure in the crowd with subfolders.

Actually it is possible to use controllers in subfolders if the extension uses namespaces.

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
 'TYPOVISION.' . $_EXTKEY,
 'pi1', array( 'Backend\Standard' => 'index'),
 // non-cacheable actions 
 array( 'Backend\Standard' => 'index' ) 
); 
 

Using the old Syntax (Tx_Foo_Bar_Baz) it does not work and we will not change this!

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( 
 'TYPOVISION.' . $_EXTKEY, 
 'pi1', 
 array( 'Backend_Standard' => 'index' ),
 // non-cacheable actions 
 array( 'Backend_Standard' => 'index' ) 
); 

So, switch to Namespaces if you are in urgent need of this feature!

By this way, the same is true for Models and Repositories in their dedicated directories. You only need to adapt the namespace and can structure your files after logical grouping.


comments

No comments yet. Be the first to comment on this!

Sorry, comments are closed for this post.