<?php
require_once DTO . 'CompleteDto.php';
final class Complete extends Action {
  private $dto;
  public function __construct() {
    $this->checkAccess();
    $this->dto = new CompleteDto();
  }
  protected function getDto() {
    return $this->dto;
  }
  public function index() {
    switch ($this->dto->option) {
      case 'register':
        $this->dto->operate = '<span style="color:#0000FF;">登録</span>';
        $this->dto->editMode = '0';
        break;
      case 'modify':
        $this->dto->operate = '<span style="color:#0000FF;">更新</span>';
        $this->dto->editMode = '1';
        break;
      case 'temp_register':
        $this->dto->operate = '<span style="color:#FF0000;">一時保存</span>';
        $this->dto->editMode = '0';
        break;
      case 'temp_modify':
        $this->dto->operate = '<span style="color:#FF0000;">一時保存</span>';
        $this->dto->editMode = '1';
        break;
    }
    return new forward();
  }
}
// EOF.
