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 6855667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:47:13+00:00 2026-05-27T01:47:13+00:00

Here is my helper class class Zend_View_Helper_CommonArea extends Zend_View_Helper_Abstract { public function commonArea() {

  • 0

Here is my helper class

class Zend_View_Helper_CommonArea extends Zend_View_Helper_Abstract {

    public function commonArea()
    {
        ?>

        <div class="clear"></div>
        <div id="quick_search">
            <div class="search">
                        <strong>QUICK SEARCH </strong>

                    <input type="text" name="keyword" id="keyword" value="Enter keywords" class="form" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" />
                <select name="select" id="select" class="selectstyled">
                    <option>Prefered Location</option>
                    <option>Prefered Location</option>
                    <option>Prefered Location</option>
                    <option>Prefered Location</option>
                    <option>Prefered Location</option>
                </select>
            </div>
            <div class="bt_box">
                <input name="find" type="submit" class="find" id="search"  value="Find Jobs" />
            </div>
            <div class="resume"><a href="jobseeker.html"><img src="images/resume.jpg" alt="" /></a></div>
        </div>


        <?php
    }
}

and My question is , I needed to add a new function to this class. I have tried by adding new function like

public function addBox()
    {
        ?>
        <div id="add_right_box"style="height:500px;"><h3 class="add_h2">Width 210px</h3></div>
        <?php
    }

to the above class, but I am getting eror something like
Plugin by name ‘AddBox’ was not found in the registry;

Here I need to know Can I add more functions to the helper class , if yes how is this possible.

  • 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-27T01:47:14+00:00Added an answer on May 27, 2026 at 1:47 am

    First, you should return all output, not echo it directly.

    From the Zend_View_Helper docs:

    In general, the class should not echo or print or otherwise generate output. Instead, it should return values to be printed or echoed. The returned values should be escaped appropriately.

    When you call $this->commonArea() from the view, it will load the ‘CommonArea’ class, and then call the matching method. So a call to $this->addBox() will look for the ‘AddBox’ class – it won’t know that you expect it to be part of the ‘CommonArea’ plugin.

    If you want to call multiple methods from the same plugin, have the matching method return an instance of the plugin:

    public function commonArea(){
      return $this;
    }
    

    Then call the methods like this:

    $this->commonArea()->addBox();
    $this->commonArea()->display(); //assuming you renamed the original method to 'display'
    

    You could look at the navigation helper or the placeholder helper to see this pattern.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is what i'm trying to do <?php class My_Controller_Plugin_SomePlugin extends Zend_Controller_Plugin_Abstract { public
Here's a really simple class: static public class Bean1 { final private String name;
I am trying to implement a custom titlebar: Here is my Helper class: import
Here is my test: [TestFixture] public class DisplayingPageLinks { [Test] public void Can_Generate_Links_To_Other_Pages() {
I have a DB helper class which extends SQLiteOpenHelper and in onCreate, I want
Currently I'm using the helper methods outlined here to return some JSON from my
simonn helped me to code an ordered integer partition function here. He posted two
Here's my Model code: class User < ActiveRecord::Base validates :email, :presence => true, :uniqueness
At work, I've found a helper class to manage WCF Services which implements IDisposable
Here is my post: I'm trying to make myself as clear as possible: Description

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.