Tag: zf2

Changing the layout or template within a Zend Framework 2 is easy. Thanks to the layout controller plugin, one can change the layout for a given controller action in just…

Read More Changing Layout in ZF2 Controller

Zend Framework

Getting the base url of a request in Zend Framework 2 is quite simple. Because you are probably extending the AbstractActionController class, you get some functionality out of the box,…

Read More Get Base Url within ZF2 Controller

Zend Framework

Zend Framework

Creating a custom controller plugin in Zend Framework 2 is easy! First, begin by creating a new class. I will put this in the Application\Controller\Plugin namespace. namespace Application\Controller\Plugin; use Zend\Mvc\Controller\Plugin\AbstractPlugin;…

Read More Creating a Custom ZF2 Controller Plugin

Zend Framework

Zend Framework

Zend Framework

Do you need more control of your paginator? Luckily, it is not mandatory to have a data source adapter fetch the data to paginate on. Rather, this can be done independently of the paginator by using the Null adapter.

Read More Pagination with the Null Adapter in ZF2

Zend Framework

Creating full URLs within view scripts can come in handy in many situations, such as when sending out e-mails where one wants to link back to one’s website. Luckily, Zend Framework 2 provides two useful view helpers to accomplish this task.

Read More Create Full URLs in ZF2 Views

Zend Framework

If you are in a situation where you need a stored procedure to return several result sets and have to access these from within Zend Framework 2, then this article will probably be useful; it shows you a way of accomplishing just this, but unfortunately not without compromises.

Read More Multiple Result Sets from Stored Procedure in ZF2

Zend Framework

This article shows how to use the URL view helper in Zend Framework 2 to build URLs to child routes. It furthermore discusses a quite useful feature of the view helper in order to reuse matched route parameters when building an URL.

Read More ZF2 URL View Helper and Child Routes

Zend Framework