Skip to content

Commit

Permalink
[TASK] Split eiD endpoints from Classes containing logic to be able t…
Browse files Browse the repository at this point in the history
…o overwrite and extend instead of only overwrite
  • Loading branch information
jmverges committed Jun 28, 2016
1 parent e66ad02 commit a99625b
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 13 deletions.
3 changes: 0 additions & 3 deletions Classes/Ajax/RemoveFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,3 @@ protected function init()
}

}

$obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Typoheads\Formhandler\Ajax\RemoveFile::class);
$obj->main();
3 changes: 0 additions & 3 deletions Classes/Ajax/Submit.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,3 @@ protected function init()
}

}

$obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Typoheads\Formhandler\Ajax\Submit::class);
$obj->main();
3 changes: 0 additions & 3 deletions Classes/Ajax/Validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,3 @@ protected function initView($content)
}

}

$obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Typoheads\Formhandler\Ajax\Validate::class);
$obj->main();
5 changes: 5 additions & 0 deletions Classes/Http/RemoveFile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
namespace Typoheads\Formhandler\Http;

$obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Typoheads\Formhandler\Ajax\RemoveFile::class);
$obj->main();
5 changes: 5 additions & 0 deletions Classes/Http/Submit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
namespace Typoheads\Formhandler\Http;

$obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Typoheads\Formhandler\Ajax\Submit::class);
$obj->main();
5 changes: 5 additions & 0 deletions Classes/Http/Validate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
namespace Typoheads\Formhandler\Http;

$obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Typoheads\Formhandler\Ajax\Validate::class);
$obj->main();
8 changes: 4 additions & 4 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
//Hook in tslib_content->stdWrap
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['stdWrap'][$_EXTKEY] = 'Typoheads\Formhandler\Hooks\StdWrapHook';

$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['formhandler'] = 'EXT:formhandler/Classes/Ajax/Validate.php';
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['formhandler-removefile'] = 'EXT:formhandler/Classes/Ajax/RemoveFile.php';
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['formhandler-ajaxsubmit'] = 'EXT:formhandler/Classes/Ajax/Submit.php';
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['formhandler'] = 'EXT:formhandler/Classes/Http/Validate.php';
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['formhandler-removefile'] = 'EXT:formhandler/Classes/Http/RemoveFile.php';
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['formhandler-ajaxsubmit'] = 'EXT:formhandler/Classes/Http/Submit.php';

// load default PageTS config from static file
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/TypoScript/pageTsConfig.ts">');
Expand All @@ -30,4 +30,4 @@
'formhandler-foldericon',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:formhandler/Resources/Public/Images/pagetreeicon.png']
);
);

0 comments on commit a99625b

Please sign in to comment.