Skip to content

Instantly share code, notes, and snippets.

@Ziiweb
Created March 19, 2015 19:49
Show Gist options
  • Save Ziiweb/7df1651a7d5627133479 to your computer and use it in GitHub Desktop.
Save Ziiweb/7df1651a7d5627133479 to your computer and use it in GitHub Desktop.
<?php
namespace Project\BackendBundle\EventListener;
//src/Project/BackendBundle/EventListener/ClippedImagesManager.php
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PostFlushEventArgs;
use Project\BackendBundle\Entity\Subitem;
class ClippedImagesManager
{
public function preUpdate(LifecycleEventArgs $args)
{
die("jklfs");
}
//src/Project/BackendBundle/Resources/config/services.yml
services:
project.clipped_images_manager:
class: Project\BackendBundle\EventListener\ClippedImagesManager
tags:
- { name: doctrine.event_listener, event: preUpdate }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment