addColumn('no', 'no', array('orderBy' => 'sorter')); $this->addColumn('image', 'image'); $this->addColumn('text', 'title', array('orderBy' => 'title')); $this->addColumn( 'show-link', 'enabled', array( 'title' => 'Show', 'orderBy' => 'enabled', 'attribs' => array('align' => 'center'), 'values' => array('y' => 'Yes', 'n' => 'No'), 'key' => $this->_primaryKey, 'url' => Qs_Request::url(array('action' => 'changeOption')) . '&', ) ); $this->addColumn('imageCount', 'imageCount', array('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; } }