开发者

CAKEPHP : Can use plugin in plugin?

example: I want use plugin tree in plugin forum I cant do this . Who can suggest about this ?

plugin in plugin , i mean:

开发者_如何学JAVA
Folder
App
----|plugin
-----------|plugin


If you talking about Plugin components or helpers, then yes. Plugin itself contain actions and you can call requestAction if you want to call exact action in another plugin.

About components and helpers do something:

class MypluginAppController extends AppController {
  var $helpers = array('Time', 'Otherplugin.Otherplugin');
  var $components = array('Otherplugin.Otherplugin');
}

In the Myplugin you can use Otherplugin (both component and helper) like

$this->Otherplugin->someaction();

Behaviours are working similarly, but you need to include them in myplugin_app_model.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜