Skip to content

Bukashk0zzz/TimestampTypeBundle

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Symfony TimestampType Bundle

Build Status Code Coverage Scrutinizer Code Quality License Latest Stable Version Total Downloads

About

A simple Symfony bundle that adds timestamp form field type.

Installation

Add this to your composer.json file:

"require": {
	"bukashk0zzz/timestamptype-bundle": "^2.0",
}

Add the bundle to app/AppKernel.php

$bundles = array(
	// ... other bundles
	new Bukashk0zzz\TimestampTypeBundle\Bukashk0zzzTimestampTypeBundle(),
);

Configuration

Not needed.

Usage

Inside a FormType:

class AccountProfileType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('nameFirst', TextType::class, ['label' => 'First Name'])
            ->add('nameLast', TextType::class, ['label' => 'Last Name'])
            ->add('startWorking', TimestampType::class, [
                'label' => 'Start working from',
                'required' => false,
            ])
        ;
    }
}

Copyright / License

See LICENSE

About

A simple Symfony2/Symfony3 bundle that adds timestamp form field type.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages