Questions tagged [zend-controller]
114 questions
3
votes
8 answers
ZEND Controllers -- How to call an action from a different controller
I want to display a page that has 2 forms. The top form is unique to this page, but the bottom form can already be rendered from a different controller. I'm using the following code to call the action of the other form but keep getting this error:
…

user225195
- 101
- 1
- 2
- 6
3
votes
1 answer
Zend Framework Unittest: How to render response on redirect()
I have a lot of $this->redirect() in my controllers, issuing a Zend_Flashmessage and then redirecting. Due to the fact, that Zend_Test is disabling responses on redirect, I can't see an opportunity to verify my flash messages.
Is there a way to call…

Matthias Klein
- 31
- 1
2
votes
2 answers
ZendFramework - How to know which controller and which specific method is execued?
When i execute /mycontroller/search it shows only "/mycontroller" but
how do i get "/mycontroller/search" when i am in search method, how do i get "/mycontroller/other" when i am in other method.
class Mycontroller extends Zend_Controller_Action
{…
user285594
2
votes
1 answer
ZendFramework - How to protect confidential files uploaded in public/directory?
Some users uploads there confidential contract/agreement files which is stored in a directory /var/www/html/project/public/contract/.
But the problem is from google search or direct link any unauthorized user can open it and…
user285594
2
votes
1 answer
Zend_View caching (Redis)
Task:
During the process of action of Zend Application to achieve next:
- for each unique url or any definite url to substitute Zend_View object by data stored in the cache (Zend_View object ) and not to perform Action
- if data in cache is null,…

aimodify
- 429
- 1
- 6
- 11
2
votes
1 answer
Zend MVC load config based on parameter in Url. Where is the right point dispatch/router/controller?
I'm defining a partner through a route based on the url e.g.
my.domain.com/:partner/:controller/:action
Now I want load the config file, databases for the partner before the front controller is called.
Where do I locate this code?
How do I…

Manuel
- 9,112
- 13
- 70
- 110
2
votes
2 answers
Zend Framework: How to stop dispatch/controller execution?
I have a Zend Framework controller with an editAction().
class WidgetController extends BaseController
{
public function editAction()
{
//code here
}
}
This controller extends a base controller which checks if the user is logged in…

Andrew
- 227,796
- 193
- 515
- 708
2
votes
1 answer
I want to control with one Controller some other Controllers with their own models (not _forward)
I'm new to zend framework and
its my first question I asked in the internet... sorry for my bad english!
I have got a problem and in some hours I would jump out of the window ;)
I have one controller A, then I need 4 other controllers (B, C,D,E) to…

Tomtom33
- 43
- 3
2
votes
1 answer
Zend Framework: How to render a different action?
I have two actions that are essentially identical, but need different URLs. Normally I would use _forward() to render the other action:
class MyController extends Zend_Controller_Action
{
public function actionOneAction()
{
…

Andrew
- 227,796
- 193
- 515
- 708
2
votes
2 answers
Zend controller/view newbie puzzle: $_GET & $_POST empty - on receipt from HTML form within view
Zend newbie here ... And just to make it better, my mission is to build on top of someone else's pre-existing Zend site.
(BTW: zf show version --> Zend Framework Version: 1.11.1 -- I seem to have Zend_Form).
Here's the curious bit. All the forms are…

confused
- 31
- 1
- 4
2
votes
1 answer
Zf3 controller not able to access the model class table located in another module
I am new to Zend Framework.
Is there a way to access the model class table which is located in another module from my active controller? As its bye bye service locator in ZF3 i am not able to access the model class table located in other…

khukuri
- 93
- 1
- 7
2
votes
0 answers
Action is not executed
Guys am creating an Auth module and inside my AuthController I have three methods:
1. loginAction()
2. autheticateAction()
3. logoutAction()
Problem is when I submit the form the autheticate() method is not executed :
$form->setAttribute('action',…

Ivan
- 5,139
- 11
- 53
- 86
2
votes
3 answers
Zend_Test_PHPUnit_ControllerTestCase and Zend_Layout, unable to find Layout plugin while running tests
I am starting to write some test cases for controller classes using Zend Framework 1.10.6 and Zend_Test_PHPUnit_ControllerTestCase. I am having problems with one item, which is that while the test cases are running,…

delatbabel
- 3,601
- 24
- 29
2
votes
4 answers
Zend_Form:: When should be form created in view and not in controller?
Zend_Form:: When should be form created in view and not in controller?
option 1 - form created in controller and passed to view (usually used)
controller:
$form=new MyForm();
$this->view->form=$form;
view:
echo $this->form;
option 2 - form created…

Ben
- 25,389
- 34
- 109
- 165
2
votes
1 answer
Zend 2 define error page for controller
I have a module with several controllers. I want to use the normal error page for all controllers except for one.
Is it possible to define a error page that is only used if an exception is thrown in a certain controller ?
That is how the module…

Ephenodrom
- 1,797
- 2
- 16
- 28