Questions tagged [zend-controller-plugin]
26 questions
5
votes
1 answer
Whats the way to use Zend_Acl in View to show/hide parts of view
I am wondering whats the way to use Zend_Acl to show/hide parts of view? I am thinking I will
Create a Controller Plugin that passes the logged in user + acl to view
$this->view->loggedInUser = Zend_Auth::getIdentity();
$this->view->acl =…

Jiew Meng
- 84,767
- 185
- 495
- 805
4
votes
2 answers
How to get translator inside controller plugin on ZF3
I want to create a plugin to use zend-i18n/translate on controller. On zf2 I have a controller plugin that does this for me, but on zf3 I could not get this to work. How can I use zend-i18n inside a controller or via controller plugin with…

rafaelphp
- 279
- 2
- 11
3
votes
1 answer
How to access controller plugins in module.php without using any controller object in ZF2..?
I want to add error handling in module.php to add all error messages in flash messenger and redirect to an specific page (in my requirement) :
public function handleError(MvcEvent $e) {
$exception = $e->getParam('exception');
…

Ritesh
- 4,720
- 6
- 27
- 41
2
votes
2 answers
Zend Framework - Getting request object in bootstrap
I am designing a site with following url form:
example.com/controller/action/locale
In which I get the locale from uri parameter locale.
In bootstrap when I want to initialize my resources like Zend_Locale, Zend_Translator or some other resource…

Mucahit Sancar Kahveci
- 343
- 1
- 2
- 8
2
votes
1 answer
Zend_Test & Controller Plugins for ACL (Redirecting)
I am suspecting that there's a problem with Controller Plugins redirecting when used in Zend Test?
I have a controller plugin like http://pastie.org/1422639 I have put echo statements for debugging. I have code for redirecting to login if user is…

Jiew Meng
- 84,767
- 185
- 495
- 805
2
votes
2 answers
Zend Framework 2 redirect() with flashMessenger does not work
I have some controller with method_1(). In this method I call method_2(). In method_2() I have (try... catch) - block with defined flashMesseges and redirect.
$this->flashMessenger()->addErrorMessage("There are errors.");
return…

VEV
- 21
- 1
- 3
2
votes
1 answer
Zf2 layout and authentication
I am building a ZF2 based site, and it has 2 different layouts. It has some public pages and some internal pages which require user authentication, each set of pages have their layouts. I was initially thinking of creating a controller plugin and…

M Hill
- 225
- 2
- 6
1
vote
1 answer
ZF, Explicit default module directory; cant register Plugin
I have several modules and also have moved the default module to the
modules/default
directory.
Every module has its Controller Plugins in each own
modulename/plugins
directory.
I do register those plugins in everys module own Bootstrap.
As…

krzysiek
- 465
- 5
- 16
1
vote
1 answer
Why is this thrown exception duplicated?
This is a follow up question of this question, which is not really important.
I have written the following front controller plugin:
public function postDispatch(Zend_Controller_Request_Abstract $request)
{
$response = $this->getResponse();
…

markus
- 40,136
- 23
- 97
- 142
1
vote
1 answer
Managing Image Uploading within Zend Framework
My app uploads an image and stores the image info in the database. If needed it manipulates the image. There are several points in the site where images can be managed like this.
In each case I have an action imageuploadAction() that handles things.…

Lothar
- 3,409
- 8
- 43
- 58
1
vote
1 answer
How get Zend_Controller_Plugin_Abstract redirect worked with full url change?it's making Zend_layout disable layout fail
I have an admin webapp.one have to login before perfoming any action.Now the /default/index/index has the login form which is an ExtJs component.basically the login process is an ajax one.i've created a plugin to disable the rendering and layout and…

black sensei
- 6,528
- 22
- 109
- 188
1
vote
1 answer
naming and path of controller plugins
I'm confused, I've read everything I found about the topic, but it doesn't work.
I want to build a plugin to use the preDispatch Action.
I would like to name it like this:
class Mosaik_Controller_Plugin_Acl extends…

pia-sophie
- 505
- 4
- 21
1
vote
1 answer
ZF1: Routes in database
I'm building a simple CMS module for my ZendFramework application.
Currently I have all my routes in a .ini file, would it be possible to make it db-driven. Or if it's possible to build a fallback method to a DB-check if the route doesn't exists in…

Phliplip
- 3,582
- 2
- 25
- 42
1
vote
2 answers
How check if action exsist in Controller Plugin preDispatch
I have two modules (default and mobile) the module mobile is a rewrite the default portal in jquery mobile but with much less controllers and actions!
I thought of write a controller plugin that check if controller and action exist in module mobile,…

JellyBelly
- 2,451
- 2
- 21
- 41
1
vote
1 answer
How to forward data to another action using Forward Plugin and read it there in Zend Framework 2?
I have two actions in a controller: actionA() and actionB(). Dependent on a condition the actionA() should return a ViewModel object or be forwarded to actionB() (and return its result):
class MyController extends AbstractActionController {
public…

automatix
- 14,018
- 26
- 105
- 230