public static function onAfterRemove(Event $event)
    {
        $layout = $event->getTarget();
        if (!is_a($layout, 'BackBee\Site\Layout')) {
            return;
        }

        $dispatcher = $event->getDispatcher();
        if (null !== $dispatcher->getApplication()) {
            $dispatcher->getApplication()->getEntityManager()
                    ->getRepository('BackBee\Site\Layout')
                    ->removeThumbnail($layout, $dispatcher->getApplication());
        }

        $dispatcher->getApplication()->getRenderer()->removeLayout($layout);
    }
public static function onAfterRemove(Event $event)
    {
        $layout = $event->getTarget();
        if (!is_a($layout, 'BackBee\Site\Layout')) {
            return;
        }

        $dispatcher = $event->getDispatcher();
        if (null !== $dispatcher->getApplication()) {
            $dispatcher->getApplication()->getEntityManager()
                    ->getRepository('BackBee\Site\Layout')
                    ->removeThumbnail($layout, $dispatcher->getApplication());
        }

        $dispatcher->getApplication()->getRenderer()->removeLayout($layout);
    }
public static function onAfterRemove ( Event $ event ) { $ layout = $ event -> getTarget ( ) ; if ( ! is_a ( $ layout , 'BackBee\Site\Layout' ) ) { return ; } $ dispatcher = $ event -> getDispatcher ( ) ; if ( null !== $ dispatcher -> getApplication ( ) ) { $ dispatcher -> getApplication ( ) -> getEntityManager ( ) -> getRepository ( 'BackBee\Site\Layout' ) -> removeThumbnail ( $ layout , $ dispatcher -> getApplication ( ) ) ; } $ dispatcher -> getApplication ( ) -> getRenderer ( ) -> removeLayout ( $ layout ) ; }
Occur on site.layout.postremove events.

@access public

@param Event $event
Occur on site . layout . postremove events .