定制 xmon/color-picker-type-bundle 二次开发

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

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

xmon/color-picker-type-bundle

最新稳定版本:v1.0.6

Composer 安装命令:

composer require xmon/color-picker-type-bundle

包简介

The ColorPickerTypeBundle extends Symfony2 form types, creates a new ColorPicker form type, to display a javascript color picker.

README 文档

README

DEPRECATED: This bundle is no longer maintained. Symfony includes ColorType natively since version 5.1.

Migration to native

Before (with this bundle)

use Xmon\ColorPickerTypeBundle\Form\Type\ColorPickerType;

$builder->add('color', ColorPickerType::class);

Now (Symfony 5.1+)

use Symfony\Component\Form\Extension\Core\Type\ColorType;

$builder->add('color', ColorType::class);

Hex color validation

If you were using the HexColor constraint, you can replace it with Regex:

use Symfony\Component\Validator\Constraints as Assert;

#[Assert\Regex(
    pattern: '/^#[0-9a-fA-F]{6}$/',
    message: 'The color {{ value }} is not valid.'
)]
public ?string $color = null;

History

This bundle was created in 2013 for Symfony 2, when there was no native form type for colors. It integrated the jscolor library to provide a JavaScript color picker.

With the arrival of HTML5 <input type="color"> and its universal support in modern browsers, Symfony added native ColorType in version 5.1, making this bundle obsolete.

License

MIT

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 7
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固