I try to follow this tutorial, but I can’t get it to work:
I did everything as described, but I don’t know how to make it available in my controllers. My filesystem looks like this:
- application
- controllers
- IndexController.php
- modules
- user
- configs
user.ini
- controllers
- forms
Login.php
- helpers
HandleLogin.php
- views
- scripts
login.phmtl
profile.phtml
Bootstrap.php
- views
How do I use the HandleLogin Helper in my IndexController? I really have no idea and I’m looking an trying for more then a day and I almost want to throw my PC out of the window ;). So any help would be appreciated!
Looks like the widget plugin is not called anywhere.
Few things to check:
Do you have a
Bootstrap.phpfile for the module?Does this bootstrap file has
_initWidgets()method?Does this method call:
$widget = new Module_Widget_Name; // is it callable?Zend_Controller_Action_HelperBroker::addHelper($widget);Have you registered widget resource?
public function _initResourceLoader(){$loader = $this->getResourceLoader();$loader->addResourceType('helper', 'helpers', 'Helper');$loader->addResourceType('widget', 'widgets', 'Widget');}Does
application.inicontainsresources.modules[] =line?