BcFormHelper::prefTag PHP Method

prefTag() public method

都道府県用のSELECTタグを表示する
public prefTag ( string $fieldName, mixed $selected = null, array $attributes = [] ) : string
$fieldName string Name attribute of the SELECT
$selected mixed Selected option
$attributes array Array of HTML options for the opening SELECT element
return string 都道府県用のSELECTタグ
    public function prefTag($fieldName, $selected = null, $attributes = array())
    {
        $options = $this->BcText->prefList();
        $attributes['value'] = $selected;
        $attributes['empty'] = false;
        return $this->select($fieldName, $options, $attributes);
    }