/** * Add first columns (group) from the model to the bridge that creates the browse table. * * You can actually add more than one column in this function, but just call all four functions * with the default columns in each * * Overrule this function to add different columns to the browse table, without * having to recode the core table building code. * * @param \MUtil_Model_Bridge_TableBridge $bridge * @param \MUtil_Model_ModelAbstract $model * @return void */ protected function addBrowseColumn3(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model) { $br = \MUtil_Html::create('br'); if ($model->hasAlias('gems__respondent2track')) { $model->set('gtr_track_name', 'label', $this->_('Track')); $model->set('gr2t_track_info', 'label', $this->_('Track description')); $items = $this->findMenuItems('track', 'show-track'); $track = 'gtr_track_name'; if ($items) { $menuItem = reset($items); if ($menuItem instanceof \Gems_Menu_MenuAbstract) { $href = $menuItem->toHRefAttribute($this->request, $bridge, array('gr2t_id_respondent_track' => $bridge->gr2t_id_respondent_track)); $track = array(); $track[0] = \MUtil_Lazy::iif($bridge->gr2t_id_respondent_track, \MUtil_Html::create()->a($href, $bridge->gtr_track_name, array('onclick' => "event.cancelBubble = true;"))); $track[1] = $bridge->createSortLink('gtr_track_name'); } } $bridge->addMultiSort($track, $br, 'gr2t_track_info'); } else { $citysep = \MUtil_Html::raw(' '); // $bridge->itemIf($bridge->grs_zipcode, \MUtil_Html::raw(' ')); $bridge->addMultiSort('grs_address_1', $br, 'grs_zipcode', $citysep, 'grs_city'); } }