Re: Two questiens regarding Structures_DataGrid
| From: | Justin Patrin | Date: | Thu, 21 Jul 2005 16:18:17 +0000 |
| Subject: | Re: Two questiens regarding Structures_DataGrid | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20090@lists.php.net to get a copy of this message | ||
On 7/19/05, Pupeno <pupeno@pupeno.com> wrote:
> Hello,
> tryng to use DataGrid I have found some problems, by now I have two questions.
> - How do I specify a relationship, that is, one of thi fields being listed is
> an id that should be used to gather info from another table, this
> relationship is specified an tho tables (MySQL InnoDB) and I am using
> DB_DataObject, basically doing:
You can do 2 things here. One is to use a column formatter. You can
have yoru formatter get the linked object and return what you want to
display.
or
You can set fb_linkDisplayFields in your linked dataobject and turn on
formbuilder_integration for the DataObject DataSource.
> $plan = DB_DataObject::factory('Plans');
> require_once('Structures/DataGrid.php');
> $plansTable =& new Structures_DataGrid(10);
> $plansTable->bind($plan);
> - The other is what is going on tha after defining this column:
> $plansTable->addColumn(new Structures_DataGrid_Column('Commands', null,
> null,
> array('class' => 'commands'), null, 'commands()'));
> which call back to:
> function commands($params){
> return 'a';
> }
> I get this notices
> Notice: Undefined variable: in /usr/lib/php/Structures/DataGrid/Column.php on
> line 183 [1]
>
>
> [1] Now that I think about it, maybe Structures_DataGrid is not ready to run
> on E_ALL reporting ?
>
All PEAR packages should work with E_ALL. Please report this as a bug.
--
Justin Patrin