TYPO3 4.7.2通过拼写包含extbase插件 [英] TYPO3 4.7.2 include extbase plugin via typoscript

查看:90
本文介绍了TYPO3 4.7.2通过拼写包含extbase插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个扩展程序,并且通过后端实现插件可以正确执行所有操作.

I wrote an extension and the implementation of the Plugin via backend does everything correctly.

但是当我尝试通过拼写实现扩展时,每次都会出现此错误:

But when I try to implement my extension via typoscript I got this error everytime:

糟糕,发生了错误!

Oops, an error occurred!

无法确定默认控制器.请检查 您的Tx_Extbase_Utility_Extension :: configurePlugin() ext_localconf.php.

The default controller can not be determined. Please check for Tx_Extbase_Utility_Extension::configurePlugin() in your ext_localconf.php.

,我不知道为什么..我尝试了不同的实现方式(每次tx_extbase_core_bootstrap-> run或tx_extbase_dispatcher-> dispatch,并附带其他信息,没有附加信息),当前的印刷文字如下:

and I don't know why.. I have tried different implementations (per tx_extbase_core_bootstrap->run or tx_extbase_dispatcher->dispatch and with additional information and without) and the current typoscript looks like this:

plugin.tx_graphichmenu {
    settings {
        menuUid = 1
    }
}

lib.tx_graphichmenu = USER
lib.tx_graphichmenu {
    userFunc = tx_extbase_core_bootstrap->run
    extensionName = Graphichmenu
    pluginName = Graphicmenu
    controller = MenuController
    action = showAction
}

temp.mainTemplate.subparts.stickyfooter < lib.tx_graphichmenu

我仔细检查了所有内容,发现没有一个错误... 尝试了没有动作"和控制器"部分的情况,没有任何改变

i double- and triple-checked everything and i found not a single fault... tried it without the "action" and "controller" part and nothing changed

ext_localconf.php中我的configurePlugin部分看起来像这样:

my configurePlugin part in the ext_localconf.php looks like this:

Tx_Extbase_Utility_Extension::configurePlugin(
    $_EXTKEY,
    'Graphicmenu',
    array(
        'Menu' => 'show',
    ),
    // non-cacheable actions
    array(
        'Menu' => '',
    )
);

显示"操作没有参数.在其中加载ts设置,从该位置开始显示对象的Uid

The "show" action got no parameters. in there I load the ts settings from where I take the Uid of the object to display

PS:每次更改后,我都清除了缓存并删除了typo3conf中的"temp_CACHED _..."文件

PS: after every change i have cleared the cache and deleted the "temp_CACHED_..." files in typo3conf

推荐答案

您需要修改引导程序,有一种通用语法:

You need to modify your bootstrap, there's a general syntax:

lib.foo = USER
lib.foo {
    userFunc = tx_extbase_core_bootstrap->run
    extensionName = YourExtension
    pluginName = YourPlugin
    vendorName = YourVendor
    switchableControllerActions {
        Standard {
            1 = action2
            2 = action3
        }
    }
}

注意:extensionName值中的 CamelCase 很重要! (感谢Kai进行确认),因此,如果extkey是:kai_some_extension,则必须将其写为KaiSomeExtension

Note: CamelCase in extensionName value is important! (Thanks to Kai for confirmation) so if extkey is: kai_some_extension it has to be written as KaiSomeExtension

因此您的情况应该是这样的:

So in your case it should be something like:

lib.foo = USER
lib.foo {
    userFunc = tx_extbase_core_bootstrap->run
    extensionName = GraphicHmenu
    pluginName = Graphicmenu
    switchableControllerActions {
        Menu {
            1 = show
        }
    }
}

这篇关于TYPO3 4.7.2通过拼写包含extbase插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆