Download the PHP package adcog-cpi/doctrine-bundle without Composer
On this page you can find all versions of the php package adcog-cpi/doctrine-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download adcog-cpi/doctrine-bundle
More information about adcog-cpi/doctrine-bundle
Files in adcog-cpi/doctrine-bundle
Download adcog-cpi/doctrine-bundle
More information about adcog-cpi/doctrine-bundle
Files in adcog-cpi/doctrine-bundle
Vendor adcog-cpi
Package doctrine-bundle
Short Description EBDoctrineBundle
License MIT
Homepage https://github.com/emmanuelballery/EBDoctrineBundle.git
Package doctrine-bundle
Short Description EBDoctrineBundle
License MIT
Homepage https://github.com/emmanuelballery/EBDoctrineBundle.git
Please rate this library. Is it a good library?
Informations about the package doctrine-bundle
EBDoctrineBundle
Set of Doctrine tools.
Configuration
Usage
Track created
date
- Implement
EB\DoctrineBundle\Entity\CreatedInterface
- Use
EB\DoctrineBundle\Entity\Doctrine\CreatedTrait
- The creation date will always be saved in the
created
field
Track updated
date
- Implement
EB\DoctrineBundle\Entity\UpdatedInterface
- Use
EB\DoctrineBundle\Entity\Doctrine\UpdatedTrait
- The update date will always be saved in the
updated
field - This date will be
null
when this entity has never been updated
Generate slug
- Implement
EB\DoctrineBundle\Entity\SlugInterface
- Use
EB\DoctrineBundle\Entity\Doctrine\SlugTrait
- Define your own
getStringToSlug
method telling the listener what string needs to be cleaned - The slug will always be saved in the
slug
field - The command
eb:doctrine:fix
is able to re-evaluate each slug field in your database
Generate salt
- Implement
EB\DoctrineBundle\Entity\SaltInterface
- Use
EB\DoctrineBundle\Entity\Doctrine\SaltTrait
- The salt will always be saved in the
salt
field - Currently the salt is a sha512 hash (see
EB\DoctrineBundle\Salt\SaltGenerator
)
Save a file with an entity
- Implement one of these interfaces :
EB\DoctrineBundle\Entity\FileInterface
(if you don't want a direct access via your webserver)EB\DoctrineBundle\Entity\FileReadableInterface
(stored in your web folder, add an URI path)EB\DoctrineBundle\Entity\FileVersionableInterface
(track different file versions)
- Use those traits :
EB\DoctrineBundle\Entity\Doctrine\FileTrait
EB\DoctrineBundle\Entity\Doctrine\FileReadableTrait
EB\DoctrineBundle\Entity\Doctrine\FileVersionableTrait
- Add an
\SplFileInfo
or anUploadedFile
to your entity usingsetFile
method EB\DoctrineBundle\Entity\FileListener
will automatically :- Save this file in the filesystem (using the entity ID and your configuration)
- Save its
filename
,extension
,size
andmime
- Save a
uniqid
(this is a trick to create mapped updates when using forms with unmappedfile
field) - Add a
path
, the current realpath of the file in the filesystem - Add an
uri
, from the web directory - Increase
version
if necessary - Delete the file in the filesystem when the entity is removed
Deal with users
- Implement one of these interfaces :
EB\DoctrineBundle\Entity\UserInterface
EB\DoctrineBundle\Entity\UserLoginInterface
EB\DoctrineBundle\Entity\UserPasswordDateInterface
- Use those traits :
EB\DoctrineBundle\Entity\Doctrine\UserTrait
EB\DoctrineBundle\Entity\Doctrine\UserAdvancedTrait
EB\DoctrineBundle\Entity\Doctrine\UserLoginTrait
EB\DoctrineBundle\Entity\Doctrine\UserPasswordDateTrait
- The
rawPassword
will always be encoded into apassword
when saved - Add all required fields and methods to create a user
- Track current and previous login dates
- Track password update date
Use Doctrine events to populate session flash bag messages
- Implement
EB\DoctrineBundle\Entity\LoggableInterface
- Configure :
- Persisted message : '%entity% saved !'
- Updated message : '%entity% updated !'
- Removed message : '%entity% removed !'
- All doctrine events will be written in user session flashbag
You can simply display those messages using Twig :
From EBStringBundle
This bundle helps me to deal with strings (for blog title in uri for example).
Controller
Twig
`
All versions of doctrine-bundle with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5
symfony/symfony Version ~2.6
doctrine/orm Version ~2.2,>=2.2.3
doctrine/doctrine-bundle Version ~1.2
symfony/symfony Version ~2.6
doctrine/orm Version ~2.2,>=2.2.3
doctrine/doctrine-bundle Version ~1.2
The package adcog-cpi/doctrine-bundle contains the following files
Loading the files please wait ....