I am working on the 'list' view of a module.
The filtered list is displayed via a call to the executeFilter() method, as
usual.
Now, I create a route and the appropriate method myModuleActions :
public function executeUseMyFilter(sfWebRequest $request) {
$id = $this->getRoute()->getObject()->getId();
// force the filter value to myotherobj_id = #the id in the route //
// ?????????????????? //
return $this->executeFilter($request);
}
But I can't find the way to modify the filters and to force the exceuteFilter()
method to display only the list of objects having myotherobj_id = $id.
________________________________
De : [email protected] [mailto:[email protected]] De
la part de Javier Garcia
Envoyé : lundi 15 février 2010 14:23
À : [email protected]
Objet : [symfony-users] Trying to give a default value to a filter form
Hi,
im trying to give a default value to a field of a filter.
I have no problems giving a default value to a form this way:
$m = new Birthday();
$m->setName('Peter');
$this->filter = new BirthdayForm($m);
But when i try this:
$m = new Birthday();
$m->setName('Peter');
$this->filter = new BirthdayFormFilter($m);
this error appears:
Warning: array_merge() [function.array-merge
<http://rs.localhost/frontend_dev.php/function.array-merge> ]: Argument #2 is
not an array in
/opt/lampp/htdocs/rs/lib/vendor/symfony/lib/form/sfForm.class.php on line 1023
Any idea?
Javi
--
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en.
--
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en.