public function preUpdate(PreUpdateEventArgs $event)
    {
        $entity = $event->getEntity();
        if ($entity instanceof CategorizableInterface) {
            $this
                ->categoryIntegrityFixer
                ->fixCategoriesIntegrity($entity);
        }
    }
public function preUpdate(PreUpdateEventArgs $event)
    {
        $entity = $event->getEntity();
        if ($entity instanceof CategorizableInterface) {
            $this
                ->categoryIntegrityFixer
                ->fixCategoriesIntegrity($entity);
        }
    }
public function preUpdate ( PreUpdateEventArgs $ event ) { $ entity = $ event -> getEntity ( ) ; if ( $ entity instanceof CategorizableInterface ) { $ this -> categoryIntegrityFixer -> fixCategoriesIntegrity ( $ entity ) ; } }
Before an update we check that the product categories are right.

@param PreUpdateEventArgs $event The pre update event.
Before an update we check that the product categories are right .