mindfire/expiryfieldbundle

A Symfony2 Custom field type with month and year selectors which is useful for applications reading Expiry Month and Year inputs such as Credit Card Expiration

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

This package is not auto-updated.

Last update: 2024-06-17 13:53:58 UTC


README

Mindfire ExpiryFieldBundle

A Symfony2 Custom field type with month and year selectors which is useful for applications reading Expiry Month and Year inputs such as Credit Card Expiration.

Usage

In composer.json, add the repository and the bundle.

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

Register the bundle in AppKernel.php

new Mindfire\Bundle\ExpiryFieldBundle\MindfireExpiryFieldBundle(),

Add the parameter to specify the object manager:(Default value is doctrine.orm.entity_manager)

expiry.object_manager_id: doctrine_mongodb.odm.document_manager

In your form type,

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

License

This bundle is available under the MIT license.