Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- config.yml
- doctrine:
- orm:
- entity_managers:
- default:
- auto_mapping: true
- mappings:
- gedmo_loggable:
- type: annotation
- prefix: Gedmo\Loggable\Entity
- dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Entity"
- alias: GedmoLoggable # (optional) it will default to the name set for the mappingmapping
- is_bundle: false
- service:
- services:
- # service_name:
- # class: AppBundle\Directory\ClassName
- # arguments: ["@another_service_name", "plain_value", "%parameter_name%"]
- stof_doctrine_extensions.listener.loggable:
- class: %stof_doctrine_extensions.listener.loggable.class%
- public: false
- calls:
- - [setAnnotationReader, ['@annotation_reader']]
- Entity:
- /**
- * @ORM\Entity
- * @ORM\Table(name="domain_registration")
- * @UniqueEntity(fields={"domain"})
- * @Gedmo\Loggable
- */
- class Domain
- {
- /**
- * @var string
- * @ORM\Column(type="string", nullable=false)
- * @Assert\NotBlank()
- * @Assert\NotNull()
- * @Assert\Regex("/^(?:[-a-z0-9]+\.)+[a-z]{2,6}$/")
- * @Gedmo\Versioned
- */
- private $domain;
- ...
Advertisement
Add Comment
Please, Sign In to add comment