PHPackages                             eltharin/automaticcollection - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. eltharin/automaticcollection

ActiveSymfony-bundle[Framework](/categories/framework)

eltharin/automaticcollection
============================

automaticcollection Bundle for symfony

V1.5.0(2y ago)173GPL-3.0PHP

Since Aug 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/eltharin/AutomaticCollection)[ Packagist](https://packagist.org/packages/eltharin/automaticcollection)[ RSS](/packages/eltharin-automaticcollection/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (12)Used By (0)

Symfony AutomaticCollection Bundle
==================================

[](#symfony-automaticcollection-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/234be48a1ff2a3543b7280d2ea2aa1c4511e99d7592655e880b7d4bb2e4802cf/687474703a2f2f706f7365722e707567782e6f72672f656c74686172696e2f6175746f6d61746963636f6c6c656374696f6e2f76)](https://packagist.org/packages/eltharin/automaticcollection)[![Total Downloads](https://camo.githubusercontent.com/1b6cef9919da5edc4f64ec5949c14e5247a339ce5c29060a3c6180e3f4e786cf/687474703a2f2f706f7365722e707567782e6f72672f656c74686172696e2f6175746f6d61746963636f6c6c656374696f6e2f646f776e6c6f616473)](https://packagist.org/packages/eltharin/automaticcollection)[![Latest Unstable Version](https://camo.githubusercontent.com/c6dfede1cdf07dbc50a6853332e572e6ad79af0e0b203cb1a7bb475d8b0b23c6/687474703a2f2f706f7365722e707567782e6f72672f656c74686172696e2f6175746f6d61746963636f6c6c656374696f6e2f762f756e737461626c65)](https://packagist.org/packages/eltharin/automaticcollection)[![License](https://camo.githubusercontent.com/4d2173280f44626bf449a9d2330e84f8339a902d150e3d325cd6ac10eb744c5d/687474703a2f2f706f7365722e707567782e6f72672f656c74686172696e2f6175746f6d61746963636f6c6c656374696f6e2f6c6963656e7365)](https://packagist.org/packages/eltharin/automaticcollection)

Installation
------------

[](#installation)

- Require the bundle with composer:

```
composer require eltharin/automaticcollection
```

You can use eltharin/twigfilesgetter for load unique Js :

In this case, you just have to write {{ get\_required\_js\_files() }} in your twig base template to load JS file.

Otherwise you have to import /bundles/eltharinautomaticcollection/js/automaticcollection.js manually

What is AutomaticCollection Bundle?
-----------------------------------

[](#what-is-automaticcollection-bundle)

This bundle will render automatic add and delete elements for Collection Type.

When allow\_add param will be set, the bundle will automaticly add a button for add a new row.

When allow\_delete param will be set the bundle will automaticly add a delete row button on each line,

When allow\_delete param is not set, you can have the delete button only for the new rows.

Use It :
--------

[](#use-it-)

As CollectionType, You have two Form Types:

PrincipalType :

```
class PrincipalType extends AbstractType
{
	public function buildForm(FormBuilderInterface $builder, array $options): void
	{
		$builder
			->add('numero')
			->add('libelle')
			->add('users', AutomaticCollectionType::class, [
						'entry_type' =>  SecondType::class,
						'allow_add' => true,
						'allow_delete' => true,
						'by_reference' => false,
						'add_button_string' => 'New',
						'delete_button_string' => 'Suppr'
					]);
		;
	}

	public function configureOptions(OptionsResolver $resolver): void
	{
		$resolver->setDefaults([
			'data_class' => null,
		]);
	}
}
```

And SecondType :

```
class SecondType extends AbstractType
{
	public function buildForm(FormBuilderInterface $builder, array $options): void
	{
		$builder
			->add('lastname')
			->add('surname')
		;
	}

	public function configureOptions(OptionsResolver $resolver): void
	{
		$resolver->setDefaults([
			'data_class' => null,
		]);
	}
}
```

In PrincipalType, the options allow\_add and allow\_delete (from CollectionType) will automaticlly add buttons add and delete on each row.

When you add a new row, the button delete will be shown no matter that the allow\_delete is at true.

you can change HTML button by replacing twig templates in your form template site or in same template :

```
{# if in same view don't forget this line to enable it #}
{% form_theme form _self %}

{%- block automatic_collection_add_button_widget -%}
    New
{%- endblock automatic_collection_add_button_widget -%}

{%- block automatic_collection_delete_button_widget -%}
    Suppr
{%- endblock automatic_collection_delete_button_widget -%}
```

don't forget to add classes automatic\_collection\_addBtn and automatic\_collection\_delBtn for JS and data-collection-holder-class="{{ id }}"

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~56 days

Recently: every ~48 days

Total

11

Last Release

799d ago

Major Versions

V0.0.2 → V1.0.02022-09-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/fff318a46a2e2f50b3a9fb70ee232f3dc317397c0b9dea4f0ed8ac37160dc471?d=identicon)[eltharin](/maintainers/eltharin)

---

Top Contributors

[![eltharin](https://avatars.githubusercontent.com/u/7547802?v=4)](https://github.com/eltharin "eltharin (12 commits)")

---

Tags

phpsymfonybundleweb

### Embed Badge

![Health badge](/badges/eltharin-automaticcollection/health.svg)

```
[![Health](https://phpackages.com/badges/eltharin-automaticcollection/health.svg)](https://phpackages.com/packages/eltharin-automaticcollection)
```

###  Alternatives

[skipthedragon/inertia-bundle

Inertia.js server-side adapter for Symfony 4, 5, 6 and 7.

7517.5k](/packages/skipthedragon-inertia-bundle)[dragon-code/support

Support package is a collection of helpers and tools for any project.

238.7M101](/packages/dragon-code-support)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
