<?php

namespace App\Helpers;

use App\Models\UserModel;

class UserSNSHelper extends CommonHelper
{
    public function __construct()
    {
        parent::__construct();
        $this->setTitleField(UserModel::TITLE);
    }
    public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string
    {
        switch ($field) {
            case 'passwd':
            case 'confirmpassword':
                $form = form_password($field, "", [...$extras]);
                break;
            default:
                $form = parent::getFieldForm($field, $value, $viewDatas, $extras);
                break;
        }
        return $form;
    } //
}
