Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7575543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:42:41+00:00 2026-05-30T16:42:41+00:00

When calling a function in my views/helpers/ file, from my script inside views/scripts/ ,

  • 0

When calling a function in my views/helpers/ file, from my script inside views/scripts/ , i get this error:

Message: Plugin by name ‘SetBlnCompany’ was not found in the registry;
used paths: 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" 

application/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 causing error

<?php 
     $this->setBlnCompany(true);
     //...etc...
?>

EDIT to add more background information to my post.

Ideally i would use this “dropdown helper” class, to have a function for “get html” a function for “get javascript” , and many setter functions to set options before the getHtml and getJavascript are called.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:42:42+00:00Added an answer on May 30, 2026 at 4:42 pm

    Your helper must have the same name than your method. Change Zend_View_Helper_Dropdownhelper into Zend_View_Helper_GetBlnCompany and it will work. Don’t forget to change your filename too: GetBlnCompany.php

    In order to use a proxy method, you simply need to return $this;:

    // /application/views/helpers/helpers/GetBlnCompany.php
    class Zend_View_Helper_GetBlnCompany extends Zend_View_Helper_Abstract
    {    
        public function getBlnCompany() 
        {
            return $this;
        }
    
        public function fooBar($blnCompany)
        {
            return ucfirst($blnCompany);
        }
    }
    

    Then, you need to call your view helper as follow:

    $this->getBlnCompany()->fooBar('google');
    //return "Google"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to return a value from (transport) to the calling function, but can't
I'm calling a function with call_user_func_array : call_user_func_array(array($this, 'myFunction'), array('param1', 'param2', 'param3')); Everything is
I am calling a function in my controller from a button click .... I
Is there anyway to calling a function from another function .. little hard to
Is message passing taking place when calling a function with no input? i.e. with:
I have the view function in django that written like a dispatcher calling other
Using the following JQuery/AJAX function I'm calling a partial view when an option is
Does anyone know how to watch a variable in calling function. For example: C#:
I'm calling a function and adding a listener for when the function returns some
Suppose you are calling a function, where there's clearly a need to break down

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.