<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

namespace Kufer\Web\KuferTools\Utils\WssField\Dozent;

class WssFieldDozentCopyright extends \Kufer\Web\KuferTools\Utils\WssField\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;
  }
}