services:
  app.listener.entity.view_listener:
    class: App\Listener\Entity\ViewListener
    tags:
      - { name: doctrine.orm.entity_listener, entity: App\Entity\Advert\View, event: prePersist, lazy: true }
    arguments:
      [ '@App\Service\ViewService' ]