parameter('server', Server::class)); return [ 'external_id' => $rules['external_id'], 'name' => $rules['name'], 'user' => $rules['owner_id'], 'description' => $rules['description'], ]; } /** * The validated input under the action's field names: user is its owner_id. * * @return array */ public function actionInput(): array { $input = $this->inputWithExtensions(); $input['owner_id'] = $input['user'] ?? null; unset($input['user']); return $input; } /** * Rename some attributes in error messages to clarify the field * being discussed. */ public function attributes(): array { return [ 'user' => 'User ID', 'name' => 'Server Name', ]; } /** * {@inheritdoc} */ protected function extensionFieldsModel(): Server { return $this->parameter('server', Server::class); } }