dudapiotr / ZfTable

*Not supported*ZfTable 3.1. Awesome ZF2 table / grid (and much much more) generator with huge possibilities of decorating and conditioning. Integrated with DataTables, Doctrine 2, Bootstrap 2.0 and 3.0.
http://dudapiotrek.laohost.net/
MIT License
75 stars 59 forks source link

Unable to fetch or create an instance for cellclosure #70

Closed cawa87 closed 8 years ago

cawa87 commented 9 years ago

When I'm tring to use filters:

 public function init()
    {

        $this->getHeader('name')->getCell()->addDecorator('closure', array(
            'closure' => function ($context, $record) {
                return $record->name ;
            }
        ));

    }

I've have error: ZfTable\Decorator\DecoratorPluginManager::get was unable to fetch or create an instance for cellclosure

Full table class - https://gist.github.com/CawaKharkov/6c72ca5bf741fa8f2573

W33k3nd commented 9 years ago

Use 'callable' instead of 'closure'.

berturion commented 8 years ago

Official documentation is wrong on these pages, 'closure' is used instead of 'callable':