I'm trying to create two models, products and product_manufacturers so that I can pull in manufacturers as well as products, edit them in the admin if necessary, and the usual CRUD stuff. Here's the schema for the tables ( it's not finalized so if you have any suggestions go ahead ).
CREATE TABLE `product_manufacturers` (
`id` int(11)...
I have been developing an application locally with an application environment setting of development. I think this is being set in the .htaccess file.
Then, I have been deploying new versions to the production server.
I don't want to have to manually change the application environment, by hand, every time I deploy a new version.
How s...
I am using zend framework. I am using the following statement to redirect to another action.
$this->_helper->redirector('some_action');
Above statement is working perfectly and 'some_action' is called. Now I want to pass some parameters to 'some_action' like this.
some_action?uname=username&[email protected]
And how to get...
I have a database with VARCHAR column url. I would like to fetch rows so that the ones that have any url value have priority over other rows, but are ordered by date row (descending), so ORDER BY 'url' DESC, 'date' DESC wouldn't work as it would order them alphabetically first. Basically, it would look something like this:
Table:
ID ...
Let's say, that we have:
$pages = array(
array(
'controller' => 'controller1',
'label' => 'Label1',
),
array (
'controller' => 'controller2',
'label' => 'Label2'
),
);
$container = new Zend_Navigation($pages);
When user clicks Label1, controller1/index action is rendered and La...
I need to deploy Zend Framework app on Ubuntu.
I've downloaded Ubuntu desktop, installed using apt-get apache+php+mysql,
but PHP turned out to be not the latest 5.3, but 5.2.1 and even
mysql extension is missing.
I understand I can get somewhere a fresh php installation, get dependent libs (like curl or libxml2) compile them one by one...
I'm trying to create 1 base form in Zend which is a part of many other forms.
Eg: the following 3 elements could be a sub form or a mini form that is a part of a larger form :
-Name
-Age
-Address
I just want to re-use the same form in different places - at times adding elements like 'shipping address' etc
I'm getting stuck at the data s...
I have a action that returns a JSON and i need to call it from another controller and i need to get this response into a variable to parse the json.
i've tried:
private function makeListFromUrl($menu)
{
$req = new Zend_Controller_Request_Http();
$req->setRequestUri('/module/controller/get.json/');
$res = new Zend_Controll...
Hi,
Is it possible to use doctrine on existing entity models like:
class user{
protected $_id;
protected $_name;
public function set_id($_id){}
public function get_id(){}
public function set_name($_name){}
public function get_name(){}
}
or to generate or use models with hard-coded getters and setters.
I dont want to use
$user->na...
I've written a helper in order to make my main nav. Part of this helper checks if there is a user logged in by checking if a user has been assigned to the view
if($this->view->user)
{
//do stuff
}
However when I call this helper in my layout script it is unable to access $this->view->user; it has NULL value (although var_dump($this->v...
Hi,
I am building a website and I require quotation marks in a configuration value.
Example:
convert_arg = -resize "1000x1000>" -strip -trim +repage -density 72x72 -sampling-factor 4:2:0 -quality 70
This particular configuration item is the command-line arguments to call Imagemagick's convert utility. The quotation marks tell the co...
I'm having an issue, an exception is thrown when Zend_Navigation is being invoked on an instance of Zend_Config_Xml.
Here's the method in which it fails in ( Bootstrap.php ):
protected function _initNavigation() {
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$config = new Zend_Config_X...
I'm trying to make breadcrumbs render in my application ( they don't show up anywhere, not even the homepage, which has a corresponding Zend Page Uri object ), which has multiple navigation areas - primary and utility. For the menu generation, I have a MenuController which I render with from within the layout using:
$this->layout()->uti...
I am using zend framework. I am using following query in zend and it is working for me perfectly.
$table = $this->getDbTable();
$select = $table->select();
$select->where('name = ?', 'UserName');
$rows = $table->fetchAll($select);
Now I want to create another query in zend with 'like' keyword. In simple SQL it is like that.
SELECT * ...
hello everyone,
currelntly Im working on some project (based on ZF) and Im wondering if it's possible to turn off one or more modules. By turn off I mean ZF wont load it at all.
To be more precise I would like to turn off one of the exiting app module.
Let say my App contains some modules written by sombody else and I for the time beein...
Is this possible to do with display groups in Zend Framework?
other ideas on how to do this?
<form>
<fieldset>
<legend>DisplayGroupOuter</legend>
<label for="outer">Outer</label>
<input type="text" name="outer" id="outer"/>
<fieldset>
<legend>DisplayGroupInner</legend>
<label for="inner">Inner</label>
...
I have a role-based permissions system where I am not sure Zend_Acl is necessary, so I'd like to ask if I am right.
The web applications in question doesn't have a separate admin screens, all controllers/actions are accessible to anyone. So I can't imagine what I can call a "resourse" in such open system.
But some user roles can see gr...
This is my code:
$route = new Zend_Controller_Router_Route_Regex('download/([^/]+)(/([^/]+))?/(\d+)/(\d+)',
array('controller' => 'download',
'action' => 'load'),
array(1 => 'name', 3 => 'or_name'...
Hi everybody
I'm new to Zend Framework and not sure if this this posible.
I want to use partialloop for creating a table with the form fields.
I'm using this code in the view:
<!-- code in views/scripts/request/edit.phtml -->
<table cellpadding='0' cellspacing='0'>
<tr>
<th>Cliente</th>
<th>Descripcion</th>
<...
Hello friends, I have this problem with a plugin in zend framework.
I've created on this route:
library/Mis/Plugins/Unpluginmas.php
in application.ini
autoloaderNamespaces[] = "Mis_"
resources.frontController.plugins.Unpluginmas = "Mis_Plugins_Unpluginmas"
Unpluginmas.php
class Mis_Plugins_Unpluginmas extends Zend_Controller_Plug...