PHPackages                             rroek/doctrine-tools-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. [Database &amp; ORM](/categories/database)
4. /
5. rroek/doctrine-tools-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

rroek/doctrine-tools-bundle
===========================

A small bundle that give you some class &amp; traits to faster make yours entities

158[5 PRs](https://github.com/RRoek/DoctrineToolsBundle/pulls)PHP

Since Dec 2Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/RRoek/DoctrineToolsBundle)[ Packagist](https://packagist.org/packages/rroek/doctrine-tools-bundle)[ RSS](/packages/rroek-doctrine-tools-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (6)Used By (0)

DoctrineToolsBundle
===================

[](#doctrinetoolsbundle)

### Features

[](#features)

- Give you some traits to build faster yours Doctrine2 Entities
- Give you a listener that override `Gedmo\Loggable\LoggableListener` (in `stof/doctrine-extensions-bundle`) which make that all fields of your entity is loggable without declare them one peer one manually.

Introduction
------------

[](#introduction)

This small bundle give you the ability to build faster your Doctrine2 Entities with some PHP Traits. This bundle depends on

- `stof/doctrine-extensions-bundle` (&amp; `gedmo/doctrine-extensions included with`) -&gt; in Dependencies ;
- `ramsey/uuid-doctrine` -&gt; in Dependencies ;
- `vich/uploader-bundle` ( for traits with files) -&gt; Caution this bundle is not included in dependencies to not force users that don't need it.

List of traits
--------------

[](#list-of-traits)

- `GenderTrait` -&gt; for gender Mr, Mrs, Mister, etc.
- `IdTrait` -&gt; for id
- `UuidTrait` -&gt; for uuid field (use ramsey/uuid-doctrine)
- `IsActiveTrait` -&gt; for a boolean active/inactive
- `IsEnabledTrait` -&gt; for a boolean enabled/disabled
- `LabelTrait` -&gt; for classic label
- `NameTrait` -&gt; for classic fields firstname &amp; lastname
- `IntegerNumberTrait` -&gt; for a int number field
- `FloatNumberTrait` -&gt; for a float number field
- `TitleTrait` -&gt; for classic title field
- `TypeTrait` -&gt; for classic type
- `YearTrait` -&gt; for year field
- `VichUploaderFileTrait` -&gt; for a file with its upload (use VichUploaderBundle)
- `VichUploaderImageTrait` -&gt; for a image file with its upload (use VichUploaderBundle)
- `SingleImageFileUploadTrait` -&gt; Same but if you don't want to use VichUploaderBundle.
- `SingleFileUploadTrait` -&gt; Same but if you don't want to use VichUploaderBundle.

Share yours
-----------

[](#share-yours)

Feel free to share yours to add its in this bundle :)

Uses
----

[](#uses)

### Activate bundle

[](#activate-bundle)

To use it, simply `composer require rroek/doctrine-tools-bundle`

### Use it in your Entity

[](#use-it-in-your-entity)

```
