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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T01:55:21+00:00 2026-05-21T01:55:21+00:00

I am doing an ACL check in the preDispatch method of an Action Helper.

  • 0

I am doing an ACL check in the preDispatch method of an Action Helper. When it fails, I want to call the action controller’s _redirect method however I am having difficulty doing this.

In the comments attached to this post, zend-framework, call an action helper from within another action helper, I see two solutions. In the first, the controller is accessed from the helper as $this->_actionController. In the second, it is accessed using $this->getActionController().

I tried both of the following:

$this->_actionController->_redirect('/');
$this->getActionController()->_redirect('/');

In either case I get ‘Method “_redirect” does not exist …’. Are there perhaps restrictions on which controller methods can be accessed from the action helper?

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

    There is Redirector action helper that you could use in your action helpers. For example:

    class My_Controller_Action_Helper_Test extends Zend_Controller_Action_Helper_Abstract {
    
         public function preDispatch()  {
            $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('Redirector');         
            $redirector->gotoUrl('/url');
        }            
    }
    

    Controller’s _redirect method is just a wrapper to the Redirector’s gotoUrl method.

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

Sidebar

Related Questions

Doing a simple create() method call in ZooKeeper seems to be incrementing by two
i am creating a acl controller plugin that checks the if the user is
Doing a rebuild of a website and I want to give several words an
I have this code. The method returns a (User, Acl, Tree) tuple. Instead of
I'm having some issues with a many to many relationship with a simple ACL
Doing some client-side JavaScript development, which requires me to call a client-side API which
Doing some ETL and I have a wide file with lots of cols, for
Doing odd/even styling with jQuery is pretty easy: $(function() { $(.oddeven tbody tr:odd).addClass(odd); $(.oddeven
Doing an ajax get request works as expected using the following code: $.ajax({ type:
Doing my first SL4 MVVM RIA based application and i ran into the following

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.