bukashk0zzz/timestamptype-bundle

A simple Symfony bundle that adds timestamp form field type.

Maintainers

Package info

github.com/Bukashk0zzz/TimestampTypeBundle

Homepage

Issues

Type:symfony-bundle

pkg:composer/bukashk0zzz/timestamptype-bundle

Statistics

Installs: 57 327

Dependents: 0

Suggesters: 0

Stars: 1

v2.4.2 2024-04-04 14:42 UTC

This package is auto-updated.

Last update: 2026-03-04 19:03:15 UTC


README

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