ZF3 get date/time format based on locale

I'm looking for a way to get the date and time or date/time format based on the user locale I have. Like: de_DE will have d-m-Y (21-10-2017) en_US will have Y/m/d (2017/10/21) Is there a way in ZF3 to get this or do I need to use some PHP based so...
more »

2017-10-21 02:10 (1) Answers

ZF3 Get browser Language

There are a several of ways to get the browser language in Zend Framework 3. Can anyone tell me what should be the right way ? I was thinking about getting the locale and substract the language from it ? ...
more »

2017-10-17 21:10 (2) Answers

Add new controller to existed module in zf3

In Zend framework 3, I tried adding new controller "ArticleController" to a existed module City but failed. I post screen shot, my folder structure and module.config.php. Could you explain what the problem is? Incidentally, it worked when accessing h...
more »

2017-10-09 10:10 (1) Answers

ZF3: Doesn't receive params from url

I've got a problem trying to retrieve params from url with ZF3. I have always the default value when I try to pass any value from url: http://domain/game/1 module.config.php 'game' => [ 'type' => Segment::class, 'option...
more »

2017-09-30 12:09 (1) Answers

ZF3: Throwing and catching exception

In my IndexController indexAction, I'm trying to throw and catch exception, then in the catch block, I want to do something, like so: namespace Application\Controller; use Zend\Mvc\Controller\AbstractActionController; class IndexController extends...
more »

2017-09-28 10:09 (1) Answers

Adding a datepicker in Zend_Form

I was searching for a possibility to add a datepicker in my form. I found several possibilities. This question is more a like what best to do question. Do I have to use the JQuery * class? What would be the best and convenient possibility? My form a...
more »

2017-09-22 13:09 (0) Answers

Zend Framework 3 skeleton two module

I'm following the zend framework 3 skeleton tutorial to the book. I first got the application module working where it shows the standard welcome to zend screen. When I added the album module everything went fine. When I navigate to /album in my ur...
more »

2017-09-18 22:09 (1) Answers

zend framework 3 Select tag validation

I am getting the error: The input was not found in the haystack After form post. Please see the selection tag code lines below: // Add "roles" field $this->add([ 'type' => 'select', 'name' => 'roles', ...
more »

2017-09-17 18:09 (1) Answers

zf3 __construct() not working

I've created a module with name Commerce in zend 3 which is working fine. Now when I inject a dependency through __construct() it throws error Too few arguments to function Commerce\Controller\IndexController::__construct(), 0 passed in /var...
more »

2017-09-07 13:09 (1) Answers

Email sending errors in zend framework 3

I am sending mail from my zf3 application. for sending email, i have config/autoload/local.php file config as below - 'email' => array( 'host' => 'smtp.gmail.com', 'port' => 587, 'connection_config' => array( ...
more »

2017-09-05 23:09 (1) Answers

get zend FlashMessenger message as string

i have code in controller as below: public function indexAction(){ $this->flashMessenger()->addMessage('hi'); } In view page : $messages = $this->flashMessenger()->getMessages(); foreach($messages as $message) { ...
more »

2017-08-31 13:08 (1) Answers

ZF3: Run validator with empty value

I have a Zend Form situation with a checkbox and one select (multiselect). The multiselect is optional, but required when the checkbox is checked. I have written a custom validator to take care of this. The problem is making sure the validator is exe...
more »

2017-08-16 13:08 (0) Answers

difference on production system

I have a ZF3 project with a controller which opens excel-files and compares them with an template which will be openened, too. On my development notebook (xampp) everything works fine, at my production system (ubuntu) the phpspreadsheet causes error...
more »

2017-07-31 16:07 (1) Answers

extend functionality of Zend_Form_Element

I'm still wondering when and where I have to register new classes and how to extend old ones. For example I found a nice code which extends Zend_Form_Element_Select so that I can use it in each form and pass my database specifications to. Because I ...
more »

2017-07-26 18:07 (1) Answers

ZF3 Upgrade unable to render Template

I'm upgrading from ZF2 to ZF3 and this goes quite well so far except the following issue when I want to load my application: ERROR Zend\View\Renderer\PhpRenderer::render: Unable to render template "error"; resolver could not resolve to a file #0 /h...
more »

2017-07-24 14:07 (0) Answers

ZF2 load different view based on domain

I have an application where I want to load some different views based on a different domain using the existing modules in my app, how can I accomplish that in my routes? I only want to change my layout so my vriews should be involved only. ...
more »

2017-07-21 14:07 (2) Answers

ZF - Doctrine2 Cannot Retrieve Repository

whats this wrong with this? I'm new in zend framework........................................................................................................................... this is my folder struct UserControllerFactory.php <?php nam...
more »

2017-07-21 02:07 (1) Answers