Unless I am missing something, couldn't you just use the same class as before that builds the HTML for you, and put the resulting HTML for the table into a view variable in your controller, and then render it in your view from the variable you assign in the controller?
Regards, Kendall Bennett, CEO A Main Hobbies 424 Otterson Drive, Suite 160 Chico, CA 95928 1-800-705-2215 (Toll-Free) 1-530-894-0797 (Int'l & Local) 1-530-894-9049 (Fax) http://www.amainhobbies.com ________________________________ From: elminster <[email protected]> Date: Mon, 4 May 2009 10:25:36 -0700 To: Zend Framework General <[email protected]> Subject: Re: [fw-general] Confused with classes, helpers and html tables vince. wrote: > > Hey, > > Could you share the code with us? > > Thanks. > It is not really the code I am worried about; it was just a class from php classes that I used pre ZF , I didnt write it. It is more the theory I am trying to get my head around. But as an example in OO PHP I would have just called the class by $envinfo = new Table(); $envinfo->SetTableAttributes( array( "width" => "100%", "border" => "0", "cellpadding" => "0" ) ); $envinfo->SetDefaultCellAttributes( array( "bgcolor" => "#DDDDFF") ); $envinfo_row = $envinfo->AddRow(); $envinfo->SetCellContent( $envinfo_row, 1, "Some column" ); <Create some more rows> $envinfo->PrintTable(); ?> But I am not sure how to get this into the view, and how to get it to use my object. I can create a helper but it tells me that doing 'new Table()' is not allowed. -- View this message in context: http://www.nabble.com/Confused-with-classes%2C-helpers-and-html-tables-tp23372632p23372811.html Sent from the Zend Framework mailing list archive at Nabble.com.
