Guest User

Untitled

a guest
Sep 20th, 2015
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. config.yml
  2. doctrine:
  3. orm:
  4. entity_managers:
  5. default:
  6. auto_mapping: true
  7. mappings:
  8. gedmo_loggable:
  9. type: annotation
  10. prefix: Gedmo\Loggable\Entity
  11. dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Entity"
  12. alias: GedmoLoggable # (optional) it will default to the name set for the mappingmapping
  13. is_bundle: false
  14.  
  15.  
  16. service:
  17. services:
  18. # service_name:
  19. # class: AppBundle\Directory\ClassName
  20. # arguments: ["@another_service_name", "plain_value", "%parameter_name%"]
  21. stof_doctrine_extensions.listener.loggable:
  22. class: %stof_doctrine_extensions.listener.loggable.class%
  23. public: false
  24. calls:
  25. - [setAnnotationReader, ['@annotation_reader']]
  26.  
  27.  
  28.  
  29. Entity:
  30.  
  31. /**
  32. * @ORM\Entity
  33. * @ORM\Table(name="domain_registration")
  34. * @UniqueEntity(fields={"domain"})
  35. * @Gedmo\Loggable
  36. */
  37. class Domain
  38. {
  39.  
  40. /**
  41. * @var string
  42. * @ORM\Column(type="string", nullable=false)
  43. * @Assert\NotBlank()
  44. * @Assert\NotNull()
  45. * @Assert\Regex("/^(?:[-a-z0-9]+\.)+[a-z]{2,6}$/")
  46. * @Gedmo\Versioned
  47. */
  48. private $domain;
  49. ...
Advertisement
Add Comment
Please, Sign In to add comment