addColumn('no', 'no', ['orderBy' => 'sorter']); $this->addColumn('image', 'image'); $this->addColumn('text', 'title', ['orderBy' => 'title']); $this->addColumn( 'show-link', 'enabled', [ 'title' => 'Show', 'orderBy' => 'enabled', 'attribs' => ['align' => 'center'], 'values' => ['y' => 'Yes', 'n' => 'No'], 'key' => $this->_primaryKey, 'url' => Qs_Request::url(['action' => 'changeOption']) . '&', ] ); $this->addColumn('imageCount', 'imageCount', ['title' => 'Photo']); $this->addColumn('options', 'options'); return $this; } public function toArray() { $item = parent::toArray(); Zend_Registry::get('doc')->addInitFunction('$("#' . $item['attribs']['id'] . '").find(".no-images").tooltip'); return $item; } }