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

namespace Kufer\KuferTools\Utils\WssField;

class WssFieldDozentCopyright extends WssField
{
  public function getChangedInfo($columnValues, $changedDm, $changedFields): array
  {
    if ($this->datamodulColumn->accesslevel == 2 && $this->datamodulColumn->canedit == 1) {
      $datamodul = $this->getDatamodulName();
      $fieldname = $this->getFieldName();

      if (isset($columnValues[$datamodul][$fieldname])) {
        $origValue = $changedDm->getVarValueEx($fieldname, $datamodul);
        $newValue = $columnValues[$datamodul][$fieldname];
        if ($origValue != $newValue) {
          $changedDm->{$fieldname} = $newValue; 
          $changedFields[] = $fieldname;
        }
      }
    }

    return array('changed' => $changedDm, 'changedFields' => $changedFields);
  }

  public function isValid($value, bool $checkPflichtfelder = true): bool
  {
    
    
    
    
    
    

    return true;
  }
}