예제 #1
0
 /**
  * Copy image to temporary directory
  *
  * @param FilterDataEvent $event
  * @return void
  */
 public function postSetData(DataEvent $event)
 {
     $entity = $event->getData();
     if ($entity instanceof ImageInterface && null !== $entity->getId()) {
         $this->imageManager->copyImagesToTemporaryDirectory($entity);
     }
 }
 /**
  * Copy images from permenent to temporary directory
  * 
  * @param DataEvent $event
  */
 public function postSetData(DataEvent $event)
 {
     $collection = $event->getData();
     if ($collection instanceof Collection) {
         foreach ($collection as $image) {
             if ($image instanceof MultiImageInterface && null !== $image->getId()) {
                 $this->imageManager->copyImagesToTemporaryDirectory($image);
             }
         }
     }
 }