定制 evotodi/ip-field-type-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

evotodi/ip-field-type-bundle

Composer 安装命令:

composer require evotodi/ip-field-type-bundle

包简介

Ip form type for symfony forms

README 文档

README

Symfony PhpStorm

Ip Field Type Symfony Bundle

Provide an ip field for symfony forms.

Requirements

  • Symfony >= 5.4
  • PHP >= 7.4

Installation

Composer

composer require evotodi/ip-field-type-bundle

Usage

Create your form:

$form = $this->createFormBuilder()
	->add('ip', IpType::class) // Defaults to ipV4
	->add('send', 'submit')->getForm();

Examples:

	->add('ip', IpType::class, array('version' => 'ipv4', 'readonly' => true, 'clear' => false));
	->add('ip', IpType::class, array('version' => 'ipv6', 'disabled' => true))
	->add('ip', IpType::class, array('version' => 'mac', 'required' => false))

Options:

Type Option Values (defaults are bold) Description
string version ipv4, ipv6, mac Sets the layout and type of input
bool disabled true, false Disables the input
bool readonly true, false Makes the input readonly
bool required true, false Makes the input required
bool clear true, false Display a clear input link

View:

{{ form_start(form) }}
    {{ form_errors(form) }}
		{{ form_widget(form.ip, { 'id': 'my_ip_field', 'class': 'form-control' }) }}
		{{ form_widget(form.mac, { 'id': 'my_mac_field' }) }}
		{{ form_widget(form.gw, { 'id': 'my_gw_field' }) }}
		{{ form_widget(form.netmask) }}
	{{ form_rest(form) }}
{{ form_end(form) }}

Value validity:

The submitted values are not validated. You need to validate them.
Javascript tries to ensure that the values typed are valid but this is not guaranteed.

Licence

This bundle is under the MIT Licence.

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固