public function activeField($attribute, $model, $generator) { $key = $this->findValue($this->getModelKey($attribute, $model), $this->activeFields); if ($key) { return $this->activeFields[$key]($attribute, $model, $generator); } }