Bundle/CoreBundle/EventSubscriber/WidgetSubscriber.php
public function updateViewCss(View $view)
    {
        $view->changeCssHash();

        //Update css file
        $this->widgetMapBuilder->build($view, true);
        $widgets = $this->widgetRepo->findAllWidgetsForView($view);

        //Generate CSS file and set View's CSS as up to date
        $oldHash = $view->getCssHash();
        $view->changeCssHash();
        $this->viewCssBuilder->updateViewCss($oldHash, $view, $widgets);
        $view->setCssUpToDate(true);

        //Persist new hash and upToDate bool
        $metadata = $this->em->getClassMetadata(get_class($view));
        $this->uow->recomputeSingleEntityChangeSet($metadata, $view);
    }
public function updateViewCss(View $view)
    {
        $view->changeCssHash();

        //Update css file
        $this->widgetMapBuilder->build($view, true);
        $widgets = $this->widgetRepo->findAllWidgetsForView($view);

        //Generate CSS file and set View's CSS as up to date
        $oldHash = $view->getCssHash();
        $view->changeCssHash();
        $this->viewCssBuilder->updateViewCss($oldHash, $view, $widgets);
        $view->setCssUpToDate(true);

        //Persist new hash and upToDate bool
        $metadata = $this->em->getClassMetadata(get_class($view));
        $this->uow->recomputeSingleEntityChangeSet($metadata, $view);
    }
public function updateViewCss ( View $ view ) { $ view -> changeCssHash ( ) ; //Update css file $ this -> widgetMapBuilder -> build ( $ view , true ) ; $ widgets = $ this -> widgetRepo -> findAllWidgetsForView ( $ view ) ; //Generate CSS file and set View's CSS as up to date $ oldHash = $ view -> getCssHash ( ) ; $ view -> changeCssHash ( ) ; $ this -> viewCssBuilder -> updateViewCss ( $ oldHash , $ view , $ widgets ) ; $ view -> setCssUpToDate ( true ) ; //Persist new hash and upToDate bool $ metadata = $ this -> em -> getClassMetadata ( get_class ( $ view ) ) ; $ this -> uow -> recomputeSingleEntityChangeSet ( $ metadata , $ view ) ; }
Change view cssHash, update css file and persist new cssHash.

@param View $view
Change view cssHash update css file and persist new cssHash .