protected function setTableHeader(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Lazy_RepeatableInterface $repeater, $columnClass)
 {
     $baseurl = $bridge->getBaseUrl();
     // Left cell with period types
     $th = $bridge->th($this->_('Period'), ' ');
     $th->class = 'middleAlign';
     $thdiv = $th->span()->spaced();
     // array('class' => 'rightFloat'));
     $contents = $this->getDateLabels();
     foreach ($this->getDateDescriptions() as $letter => $title) {
         if (isset($contents[$letter])) {
             $content = $contents[$letter];
         } else {
             $content = strtolower($this->_($letter));
         }
         if ($letter == $this->dateType) {
             $thdiv->span($content, array('class' => 'browselink btn btn-primary btn-xs disabled'));
         } else {
             $thdiv->a(array(self::DATE_TYPE => $letter, self::DATE_FACTOR => $this->dateFactorChanges[$letter]) + $baseurl, $content, array('class' => 'browselink btn btn-default btn-xs', 'title' => $title));
         }
     }
     // Repeating column
     switch ($this->dateType) {
         case 'D':
             // $header = $repeater->period_1;
             $header = $repeater->period_1->call($this->util->getTranslated()->formatDate);
             break;
         case 'W':
             $header = array($repeater->period_1, \MUtil_Html::create()->br(), \MUtil_Lazy::call('sprintf', $this->_('week %s'), $repeater->period_2));
             break;
         case 'M':
             $header = array($repeater->period_1, \MUtil_Html::create()->br(), $repeater->period_2->call($this->util->getLocalized()->getMonthName));
             break;
         case 'Y':
             $header = $repeater->period_1;
             break;
         default:
             throw new \Gems_Exception_Coding('Incorrect date_type value: ' . $this->dateType);
             //  $this->_getParam('date_type', 'W'));
     }
     $th = $bridge->th();
     $th->class = array($this->dataCellClass, $columnClass);
     $th->a(array(self::DATE_FACTOR => $repeater->date_factor, \MUtil_Model::AUTOSEARCH_RESET => null) + $baseurl, $header);
     $th->setRepeater($repeater);
     $th->setRepeatTags(true);
     $baseurl[\Gems_Selector_DateSelectorAbstract::DATE_FACTOR] = $repeater->date_factor;
     $baseurl[\Gems_Selector_DateSelectorAbstract::DATE_GROUP] = null;
     $th->onclick = array('location.href=\'', new \MUtil_Html_HrefArrayAttribute($baseurl), '\';');
 }