zend-framework

Zend_paginator doesn't change perPage value, when there're some GET parameters

喜欢而已 提交于 2019-12-12 04:37:43
问题 It works perfectly, when I am on first page of the results - I can display the number of results I need. But when I'm on another page, the number of results cannot be changed. Why is that? And when I'm for example on 3 page, and I'm displaying 12 per page and I try to change it to 60, on the end of link I have: perPage/12/submitPagin/Zastosuj/page/3?perPage=60&submitPagin=Zastosuj Any ideas, anyone? :) public listAction(){ (...) $params = $this->_parseSearchParams( $this->getRequest()-

How can you translate this query into zend framework 2 syntax?

情到浓时终转凉″ 提交于 2019-12-12 04:36:42
问题 I haven't figure it out, how to translate this query into zend framework syntax, any help would be apreciated. SELECT p.idProyecto,p.nombre, p.nombre, e.nombre, e.apellido, sum(Respuesta.estimado) as estimado, DATE_FORMAT(p.fechaInicio, '%Y/%m/%d') as inicio, DATE_FORMAT(p.fechaFin, '%Y/%m/%d') as fin, sum(DetailTotals.Total) as total FROM Actividad as a LEFT JOIN ( SELECT a2.idActividad, sum(ar2.tiempoEstimado) as estimado FROM actividadResponsable as ar2 JOIN actividad as a2 on ar2

How to change the separation character of Zend Url?

做~自己de王妃 提交于 2019-12-12 04:30:29
问题 I use Zend URL view helper for building my urls. Everythings works exactly as I'd like to, except one thing: The character used for replacing spaces in the url is a plus (+). I'd like it to be a 'min' (-). How can I change this? Example: Now: /nl/nieuws/bericht/3/title/nieuwe**+ affiches Wish: /nl/nieuws/bericht/3/title/nieuwe -**affiches Thanks in advcance! 回答1: This isn't in the documentation anywhere, but it appears that the Zend URL view helper can take a parameter in it's $urlOptions

Zend_Dojo_Form not rendering in layout

杀马特。学长 韩版系。学妹 提交于 2019-12-12 03:55:25
问题 I have a quick question about adding Zend_Dojo_Form into Zend_layouts. I have a Zend_Dojo_Form that I want to display in the layout that is used for a particular controller. I can add the form to the layout without any issue however the dojo elements fail to render, as they would do if I added the form to a standard view. Is there any reason why this would be the case? Do I need to do something to the layout so that it will enable the components for this embedded form in the layout. Any other

realpath() open_basedir restriction in effect.

纵然是瞬间 提交于 2019-12-12 03:48:26
问题 I'm trying to get my Zend Framework application up and running on my VPS. I'm receiving this error: Error Warning: realpath() [function.realpath]: open_basedir restriction in effect. Apparently this is quite common with Plesk's default restrictions so I'm sure some of you have faced the same problem. What I've tried In /var/www/vhosts/DOMAIN/conf/ I have created the file vhost.conf using the Virtuozzo Power Panel. Below is the code that I placed in vhost.conf: Attempt 1 <Directory /var/www

Determine Filesize of Email Attachment Before Downloading

萝らか妹 提交于 2019-12-12 03:43:36
问题 I'm using Zend Mail library to access email and download email attachments. Is there a way to determine the attachment's filesize before downloading? 回答1: You don't say how you are 'downloading' it. There are many ways to receive an email. The simplest three are: SMTP - No, there is no way, POP3 - I think servers typically provide size of the total email, not sure, and IMAP - I really don't recall The answer is in the protocol you are using to retrieve (download). If you don't know that, at

Is it possible to instantiate as child object but then extract the parent object in PHP?

孤者浪人 提交于 2019-12-12 03:34:08
问题 I'm running into a problem working around limitations in Zend Framework 1.x and I can't replace or update it at the moment. I have a novel idea but I'm not sure if it's possible. The basic question is Is it possible to instantiate an extending child object, but then extract the parent object afterward for serialization? To illustrate why, essentially the Zend_Mail class has some really stupid limitations and type checks on its methods, in my case specifically $mail->setType() . My thought is

Using several modules in the same view

蓝咒 提交于 2019-12-12 03:30:09
问题 I'm developing a web application with Zend Framework 1.12, which is something new to me, and I'm not sure about the way to do something I want to. EDIT: When I talk about Module, I mean Controller, sorry for that, I still mistake the terms ... On my home page, the module Index, I made what I wanted to do with it, created several actions and all the stuff, but I'd like to add a search engine I'll make myself. The problem is that I'd like to create the search engine as a separate module named

Insert custom HTML into Zend_Form

 ̄綄美尐妖づ 提交于 2019-12-12 03:30:05
问题 I have a Zend_Form created from a controller like this: $form = new Zend_Form; $form->setAction('/ad/add')->setMethod('post')->setAttrib('id', 'add_form'); $form->addElement('text', 'name', array( 'label' => 'Name', 'description' => 'Ex.: Samsung Galaxy Tab 10.1', 'validators' => array( 'alnum', 'notEmpty', array('stringLength', array('min' => 3, 'max' => 150)) ), 'required' => true )); $form->addElement('textarea', 'description', array( 'label' => 'Description', 'description' => 'Make sure

A new entity was found through the relationship. Doctrine

夙愿已清 提交于 2019-12-12 03:23:20
问题 This question was migrated from Stack Overflow на русском because it can be answered on Stack Overflow. Migrated 4 years ago . The application has thrown an exception! Doctrine\ORM\ORMInvalidArgumentException A new entity was found through the relationship 'Core\Model\Filter#category' that was not configured to cascade persist operations for entity: Core\Model\Category@00000000314fc99200005639c0395a5e. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity