public function update(ContentUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        if (null !== $content = ContentQuery::create()->findPk($event->getContentId())) {
            $con = Propel::getWriteConnection(ContentTableMap::DATABASE_NAME);
            $con->beginTransaction();

            $content->setDispatcher($dispatcher);
            try {
                $content
                    ->setVisible($event->getVisible())
                    ->setLocale($event->getLocale())
                    ->setTitle($event->getTitle())
                    ->setDescription($event->getDescription())
                    ->setChapo($event->getChapo())
                    ->setPostscriptum($event->getPostscriptum())
                    ->save($con)
                ;

                $content->setDefaultFolder($event->getDefaultFolder());

                $event->setContent($content);
                $con->commit();
            } catch (PropelException $e) {
                $con->rollBack();
                throw $e;
            }
        }
    }
public function update(ContentUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        if (null !== $content = ContentQuery::create()->findPk($event->getContentId())) {
            $con = Propel::getWriteConnection(ContentTableMap::DATABASE_NAME);
            $con->beginTransaction();

            $content->setDispatcher($dispatcher);
            try {
                $content
                    ->setVisible($event->getVisible())
                    ->setLocale($event->getLocale())
                    ->setTitle($event->getTitle())
                    ->setDescription($event->getDescription())
                    ->setChapo($event->getChapo())
                    ->setPostscriptum($event->getPostscriptum())
                    ->save($con)
                ;

                $content->setDefaultFolder($event->getDefaultFolder());

                $event->setContent($content);
                $con->commit();
            } catch (PropelException $e) {
                $con->rollBack();
                throw $e;
            }
        }
    }
public function update ( ContentUpdateEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { if ( null !== $ content = ContentQuery :: create ( ) -> findPk ( $ event -> getContentId ( ) ) ) { $ con = Propel :: getWriteConnection ( ContentTableMap :: DATABASE_NAME ) ; $ con -> beginTransaction ( ) ; $ content -> setDispatcher ( $ dispatcher ) ; try { $ content -> setVisible ( $ event -> getVisible ( ) ) -> setLocale ( $ event -> getLocale ( ) ) -> setTitle ( $ event -> getTitle ( ) ) -> setDescription ( $ event -> getDescription ( ) ) -> setChapo ( $ event -> getChapo ( ) ) -> setPostscriptum ( $ event -> getPostscriptum ( ) ) -> save ( $ con ) ; $ content -> setDefaultFolder ( $ event -> getDefaultFolder ( ) ) ; $ event -> setContent ( $ content ) ; $ con -> commit ( ) ; } catch ( PropelException $ e ) { $ con -> rollBack ( ) ; throw $ e ; } } }
process update content

@param ContentUpdateEvent $event
@param $eventName
@param EventDispatcherInterface $dispatcher
@throws PropelException
@throws \Exception
process update content