As you may noticed, there is a new GUI for the Extension Manager. The application is based on tabs, where each tab holds an own application.
Normally you plug in as submodule like the kickstarter, then you get a new entry in the module menu. But then you have to build the complete module by your own.
So why not plug in existing GUI and reuse existing components of Extension Manager? Well, this will be possible with version 4.5.1. Let's see how to do.
Create a new extension with an ext_localconf.php, insert the hook there:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['em/classes/class.tx_em_extensionamager.php']['renderHook'][] = 'EXT:em_tools/class.tx_emtools.php:tx_emTools';
Then create the class for the hook:
class tx_emTools {
public function render($pageRenderer, &$settings, &$content) {
$path = t3lib_extMgm::extRelPath('em_tools');
$pageRenderer->addJsFile($path . 'GlobalFileEditor.js');
}
}
In the javascript file we reuse the filelist component of em and set the start point to the root of our installation.
This is done with the baseParam node: ''. Here the complete file:
Ext.ns('TYPO3.EM');
TYPO3.EM.AdditionalApplicationItems.push({
title: 'Global File Editor',
xtype: 'extfilelist',
rootText: 'TYPO3',
rootIcon: 'sysext/t3skin/images/icons/apps/pagetree-root.png',
baseParams: {
extkey: 'em_tools',
node: ''
},
noWindowOpen: true
});
done! Sure this is very rough, but open / save will work through Extension Manager ExtDirect class. Fine tuning is missing for now, eg add new buttons to the GUI with own actions, or use other settings for allow edit then in global context.
I look forward to others trying out and finding glitches just in time to be fixed for 4.5.1 :)