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

class HinterlegungIlUnit extends HinterlegungDialogBasis
{
  
  public $data;

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

    $dbwHLIlUnit = new DBWorkHLIlUnit();
    $this->data = $dbwHLIlUnit->getAll();
  }

  
  public function GetColumnCount()
  {
    return 2;
  }

  
  public function GetColumnTitle($col)
  {
    switch ($col) {
      case 0: return 'ILUnit';
      case 1: return 'Unit';
    }

    return '';
  }

  
  public function GetColumnWidth($col)
  {
    switch ($col) {
      case 0: return '35%';
      case 1: return '65%';
    }

    return '';
  }

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

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

  
  public function GetValueAt($row, $col)
  {
    switch ($col) {
      case 0: return $this->data[$row]->ilunit;
      case 1: return $this->data[$row]->ilunittext;
    }
  }

  
  public function GetFilterValues($row)
  {
    return array($this->data[$row]->stufen_id);
  }
}