I built an extension and I would like to add plugin options at the time of adding the plugin to the page
Extension Name : hotels
in Hotel model ,
<?php
class Hotel{
... get set methods ...
}
?>
in HotelController.php
<?php
namespace TYPO3HotelsController;
class HotelController extends TYPO3CMSExtbaseMvcControllerActionController{
public function listAction(){
// $this->view->assign('result', array('test' => 'hello, u r in list')); }
}
?>
in ext_localconf.php
TYPO3CMSExtbaseUtilityExtensionUtility::configurePlugin(
'TYPO3.' . $_EXTKEY,
'hotels',
array('Hotel' => 'list,single,display,update,save,preview,edit')
);
in ext_tables.php
TYPO3CMSExtbaseUtilityExtensionUtility::registerPlugin(
$_EXTKEY,
'hotels',
'list of Hotels'
);
$pluginSignature = str_replace('_','',$_EXTKEY) . '_hotels';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] ='pi_flexform';
TYPO3CMSCoreUtilityExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_myhotel.xml');
Somehow, I think i'm missing something. This gives an error :
I can see the option in backend side at time of adding extension but when i want to show (view) that Page where I add that extension , generates an error .
----> The default controller for extension "Hotels" and plugin "hotels" can not be determined. Please check for TYPO3CMSExtbaseUtilityExtensionUtility::configurePlugin() in your ext_localconf.php.
Please Guide me
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…