When I call the function in my views / helpers / file from my script inside the views / scripts / , I get this error:
Message: a plugin named 'SetBlnCompany' was not found in the registry; paths used: My_View_Helper_: / WWW / zendserver / HTDOCS / development / application / views / helpers / Zend_View_Helper_: Zend / View / Helper /: / WWW / zendserver / HTDOCS / development / application / views / helpers /
bootstrap.php
protected function _initConfig() { Zend_Registry::set('config', new Zend_Config($this->getOptions())); date_default_timezone_set('America/Chicago'); } protected function _initAutoload() { $autoloader = new Zend_Application_Module_Autoloader(array( 'namespace' => 'My', 'basePath' => dirname(__FILE__), )); return $autoloader; }
application.ini
resources.view.helperPath.My_View_Helper = APPLICATION_PATH "/views/helpers"
apps / views / helpers / DropdownHelper.php
class Zend_View_Helper_Dropdownhelper extends Zend_View_Helper_Abstract { public $blnCompany = false; public function getBlnCompany() { return $this->blnCompany; } public function setBlnCompany($blnCompany) { $this->blnCompany = $blnCompany; } }
script causes an error
<?php $this->setBlnCompany(true);
EDIT to add more information to my post.
Ideally, I would use this dropdown helper class to have a get html function for the get javascript function, and many setter functions to set parameters before calling getHtml and getJavascript.
adam
source share