Questions tagged [zend-controller-plugin]

26 questions
1
vote
1 answer

Zend stack order of plugins assistance

I have several plugins, and I'm trying to figure out the order they should be applied in. Here they are: Acl and Authentication Custom ErrorHandler to use an errocontroller within a module Internationalization plugin View setup Area Setup (sets…
somejkuser
  • 8,856
  • 20
  • 64
  • 130
0
votes
1 answer

Zend Framework: add data to layout for every action of controller

i am writing a web application and i need all the data returned/computed in all actions of one specific controller to return data to the layout (not the view). So after each action, a controller variable needs to be passed to the layout so the…
0
votes
2 answers

How to Pass data/variables/objects to Zend_Controller_Plugin

I am converting an old ZF app (its using an early ZF version where we used to do manual app loading/config in the index.php) to latest version, and in one of the plugin we are sending data directly to the plugin constructor…
Bryan
  • 645
  • 1
  • 6
  • 18
0
votes
1 answer

Zend Framework: How to register and call plugin in bootstrap file

1- How can I register and call my plugin in bootstrap file? 2- Is it a better way to use boostrap file intead of application.ini file for registering and calling my plugins ? Note: Iam using custom path ('Mylib/Controller/Plugin') for storing my…
Simpanoz
  • 2,729
  • 10
  • 43
  • 64
0
votes
1 answer

How to use a plugin method in the onDispatch event?

I have a plugin which looks up the user grants. I declarated it in my module.config.php as follows: 'controller_plugins' => [ 'factories' => [ Controller\Plugin\AccessPlugin::class => function($container) { return new…
pia-sophie
  • 505
  • 4
  • 21
0
votes
1 answer

After renaming the Zend Framework project directory, the plugin redirect () has stopped working

I want to test new design of my project without turn off original one. I made a copy of the entire source directory to the new directory. I prepared subdomain and directory name as follow (this is shared hosting):
0kph
  • 11
  • 3
0
votes
1 answer

Calling custom plugin from view helper

Is there any way to call custom plugin from view helper in ZF3? As per ZF3, the Factory for the Helper is created by me. In ZF2 this is how we call the Plugin. $ecommercePlugin =…
Keyur
  • 1,113
  • 1
  • 23
  • 42
0
votes
2 answers

Use ZF2 controller plugins for application services within an DDD?

I am currently using DDD (Domain Driven Design) for a new Zend Framework 2 project. Everything works fine but I do have a question regarding the application services. I understood that application services are located at the application layer and…
0
votes
1 answer

When should AcceptableViewModelSelector and Rendering / Response Strategies be used in Zend Framework 2?

If one needs JSON, XML, etc. als output format, one can use the AcceptableViewModelSelector Controller Plugin or / and (?) alternate rendering / response strategies. When should the one and when the other (and when a combination) be…
automatix
  • 14,018
  • 26
  • 105
  • 230
0
votes
2 answers

calling a php class function syntax

I am currently looking a this piece of code from a module called ZfcUser for Zend 2: namespace ZfcUser\Controller; use Zend\Form\Form; use Zend\Mvc\Controller\AbstractActionController; use Zend\Stdlib\ResponseInterface as Response; use…
0
votes
1 answer

Zend plugin to capture referrer for every visitor

To build some simple analytics for our site - I am trying to capture the source from where the user lands on our page and if he ends up registering - store the source in the database. Since this code has to be on all the pages - I thought of adding…
1
2