madcorp / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

tedius date format dd/mm/yyyy filter implements #812

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.in my controller:
<code>
class Admin_GridController extends Zend_Controller_Action
{
 public function indexAction()
{
$grid= Bvb_Grid::factory('Bvb_Grid_Deploy_Table');
$gridModel = new Admin_Model_DBUsers();

//select that returns date in dd/mm/yyyy format:
$select= $gridModel->getListUserTable();

$grid->setSource(new Bvb_Grid_Source_Zend_Select($select));
$filters = new Bvb_Grid_Filters();
$filters->addFilter('date',array('render'=>'date','transform'=>'myfunction'));
$grid->addFilters($filters);

}
public my_function($value)
{
//This function has never called
}

</code>
2.Writing date formats dd/mm/aaaa into date filter or order by datefilter

3.error page not found

What is the expected output? What do you see instead?
I try develop a class that extends Bvb_Grid and implements 
Bvb_Grid_Deploy_DeployInterface, to solve it issue.
but I see a lot of URL problems, url buton generated problems,
populate data problems, Order by problems, etc.

Anybody implements a Bvb_grid whith dd/mm/aaaa

Thanks a lot,
sorry by my poor language.

Please insert the appropriate values;
                    Zend Framework version:1.11.11
ZFDatgrid Version (Bvb_Grid::getVersion()):0.8
                          Operating system:Windows 7
                               PHP Version:5.3.8
               Database Server and version:MySql 5.5.16
Source Adatapter:

Please provide any additional information below.

Original issue reported on code.google.com by manuel.v...@googlemail.com on 12 Jan 2012 at 1:09

GoogleCodeExporter commented 9 years ago
Hi,

In your example you have some typos errors:

- 'transform'=>'myfunction' => 'transform'=>'my_function'
- public my_function($value) => function my_function($value)

Now the issue, try change:
'transform'=>'my_function'
to
'transform'=>array($this, 'my_function')

Now it's supposed to work.

Best Regards
Ivo Monteiro

Original comment by ivomonte...@gmail.com on 14 Mar 2012 at 8:37

GoogleCodeExporter commented 9 years ago

Original comment by licentia...@gmail.com on 6 May 2012 at 6:08