PHPackages                             tuxes3/doctrine-util-bundle - 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. tuxes3/doctrine-util-bundle

ActiveSymfony-bundle

tuxes3/doctrine-util-bundle
===========================

Simple way to translate your entities in forms

115PHP

Since Aug 28Pushed 11y ago1 watchersCompare

[ Source](https://github.com/tuxes3/DoctrineUtilBundle)[ Packagist](https://packagist.org/packages/tuxes3/doctrine-util-bundle)[ RSS](/packages/tuxes3-doctrine-util-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

DoctrineUtilBundle
==================

[](#doctrineutilbundle)

Simple way to translate your entities in forms.

Installation: add to you composer.json

Add to your project in your AppKernel.php:

```
...
new TX3\DoctrineUtilBundle\Tuxes3DoctrineUtilBundle(),
...

```

Annotated your entities

```
...
use TX3\DoctrineUtilBundle\Annotations as TX3;
...
/**
 * @var string
 * @TX3\Translatable()
 */
protected $name;

/**
 * @TX3\Translatable(true)
 */
protected $translations = array();
...

```

Use it in a FormType

```
...
$builder->add('translations', 'translation', array(
	'label' => 'Tag Name',
));
...

```

A form is rendered with an input for each defined languag in config.yml:

```
tuxes3_doctrine_util:
	locales: [de,en]

```

Searching by translated field:

```
...
$repo = $this->em->getRepository("XXXXBundle:Tag");
$translationRepo = $this->em->getRepository("Tuxes3DoctrineUtilBundle:Translation");
$tag = $repo->find($translationRepo->id('Tag', 'name', $name)); // 'Tag' ===> Classname of entity, 'name' ===> fieldname
...

```

Saving a translation in code:

```
$tag = new Tag();
$tag->setName($name);
$this->em->persist($tag);
$this->em->flush(); // setObjid($tag->getId());
$translation->setField('name');
$translation->setClass('Tag');
$translation->setContent($name);
$translation->setLocale('en');
$this->em->persist($translation);

```

TODO:

- Search with language
- more options in formtype rendering
- Use Doctrine caching
- ...

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tuxes3-doctrine-util-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tuxes3-doctrine-util-bundle/health.svg)](https://phpackages.com/packages/tuxes3-doctrine-util-bundle)
```

PHPackages © 2026

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