TestDbField::class, 'MyTestField' => TestDbField::class, ]; public $setFieldCalledCount = 0; public function setField(string $fieldName, mixed $value): static { $this->setFieldCalledCount++; return parent::setField($fieldName, $value); } public function setMyTestField($val) { return $this->setField('MyTestField', strtolower($val)); } }