<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

class HinterlegungIlStufe extends HinterlegungDialogBasis
{
  
  public $data;

  public function __construct()
  {
    parent::__construct();

    $dbwHLIlStufe = new DBWorkHLIlStufe();
    $this->data = $dbwHLIlStufe->getAll();
  }

  
  public function GetColumnCount()
  {
    return 4;
  }

  
  public function GetColumnTitle($col)
  {
    switch ($col) {
      case 0: return 'Stufe';
      case 1: return 'Level';
      case 2: return 'Text';
      case 3: return '';
    }

    return '';
  }

  
  public function GetColumnWidth($col)
  {
    switch ($col) {
      case 0: return '40%';
      case 1: return '20%';
      case 2: return '40%';
      case 3: return '';
    }

    return '';
  }

  
  public function GetIdColumnIndices()
  {
    return array(0, 1, 3);
  }

  
  public function GetRowCount()
  {
    return count($this->data);
  }

  
  public function GetValueAt($row, $col)
  {
    switch ($col) {
      case 0: return $this->data[$row]->stufe;
      case 1: return $this->data[$row]->illevel;
      case 2: return $this->data[$row]->text;
      case 3: return $this->data[$row]->id;
    }
  }

  
  public function GetColumnsToHide()
  {
    return array(3);
  }
}