/**
  * Adds columns from the model to the bridge that creates the browse table.
  *
  * Adds a button column to the model, if such a button exists in the model.
  *
  * @param \MUtil_Model_Bridge_TableBridge $bridge
  * @param \MUtil_Model_ModelAbstract $model
  * @rturn void
  */
 protected function addBrowseTableColumns(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model)
 {
     $model->setIfExists('gr2o_opened', 'tableDisplay', 'small');
     $model->setIfExists('grs_email', 'formatFunction', array('MUtil_Html_AElement', 'ifmail'));
     if ($menuItem = $this->findAllowedMenuItem('show')) {
         $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge));
     }
     // Newline placeholder
     $br = \MUtil_Html::create('br');
     // Display separator and phone sign only if phone exist.
     $phonesep = $bridge->itemIf($bridge->grs_phone_1, \MUtil_Html::raw('☏ '));
     $citysep = $bridge->itemIf($bridge->grs_zipcode, \MUtil_Html::raw('  '));
     if ($this->currentUser->hasPrivilege('pr.respondent.multiorg')) {
         $bridge->addMultiSort('gr2o_patient_nr', $br, 'gor_name');
         //, \MUtil_Html::raw(' '), 'gr2o_opened');
     } else {
         $bridge->addMultiSort('gr2o_patient_nr', $br, 'gr2o_opened');
     }
     $bridge->addMultiSort('name', $br, 'grs_email');
     $bridge->addMultiSort('grs_address_1', $br, 'grs_zipcode', $citysep, 'grs_city');
     $bridge->addMultiSort('grs_birthday', $br, $phonesep, 'grs_phone_1');
     if ($menuItem = $this->findAllowedMenuItem('edit')) {
         $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge));
     }
 }
 /**
  * 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 addBrowseColumn2(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model)
 {
     $br = \MUtil_Html::create('br');
     $model->setIfExists('grs_email', 'formatFunction', array('MUtil_Html_AElement', 'ifmail'));
     $bridge->addMultiSort('name', $br, 'grs_email');
 }