mindfire/expiryfieldbundle

一个带有月份和年份选择器的Symfony2自定义字段类型,适用于读取有效期月份和年份输入的应用程序,例如信用卡过期日期。

dev-master / 1.0.x-dev 2016-01-29 04:01 UTC

This package is not auto-updated.

Last update: 2024-09-23 15:21:57 UTC


README

一个带有月份和年份选择器的Symfony2自定义字段类型,适用于读取有效期月份和年份输入的应用程序,例如信用卡过期日期。

用法

在composer.json中添加仓库和包。

 "require": {
        "mindfire/expiryfieldbundle": "*"
    }

在AppKernel.php中注册包

new Mindfire\Bundle\ExpiryFieldBundle\MindfireExpiryFieldBundle(),

添加参数以指定对象管理器:(默认值为doctrine.orm.entity_manager

expiry.object_manager_id: doctrine_mongodb.odm.document_manager

在您的表单类型中,

$builder->add('ccExpiration', 'expiry');

许可

此包可在MIT许可下使用。