BcFreezeHelper::text PHP Method

text() public method

テキストボックスを表示する
public text ( string $fieldName, array $attributes = [] ) : string
$fieldName string フィールド文字列
$attributes array html属性 - 凍結時に、$attributes["value"]が指定されている場合、その値がvalueになる。  指定されてない場合、$this->request->data[$model][$field]がvalueになる。
return string htmlタグ
    public function text($fieldName, $attributes = array())
    {
        if ($this->freezed) {
            list($model, $field) = explode('.', $fieldName);
            if (isset($attributes)) {
                $attributes = $attributes + array('type' => 'hidden');
            } else {
                $attributes = array('type' => 'hidden');
            }
            if (isset($attributes["value"])) {
                $value = $attributes["value"];
            } else {
                $value = $this->request->data[$model][$field];
            }
            return parent::text($fieldName, $attributes) . $value;
        } else {
            return parent::text($fieldName, $attributes);
        }
    }