Skip to content

Latest commit

 

History

History
executable file
·
38 lines (26 loc) · 805 Bytes

README.md

File metadata and controls

executable file
·
38 lines (26 loc) · 805 Bytes

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.