public function viewCheck(ViewCheckEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        if ($event->getView() == 'folder') {
            $folder = FolderQuery::create()
                ->filterById($event->getViewId())
                ->filterByVisible(1)
                ->count();

            if ($folder == 0) {
                $dispatcher->dispatch(TheliaEvents::VIEW_FOLDER_ID_NOT_VISIBLE, $event);
            }
        }
    }
public function viewCheck(ViewCheckEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        if ($event->getView() == 'folder') {
            $folder = FolderQuery::create()
                ->filterById($event->getViewId())
                ->filterByVisible(1)
                ->count();

            if ($folder == 0) {
                $dispatcher->dispatch(TheliaEvents::VIEW_FOLDER_ID_NOT_VISIBLE, $event);
            }
        }
    }
public function viewCheck ( ViewCheckEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { if ( $ event -> getView ( ) == 'folder' ) { $ folder = FolderQuery :: create ( ) -> filterById ( $ event -> getViewId ( ) ) -> filterByVisible ( 1 ) -> count ( ) ; if ( $ folder == 0 ) { $ dispatcher -> dispatch ( TheliaEvents :: VIEW_FOLDER_ID_NOT_VISIBLE , $ event ) ; } } }
Check if is a folder view and if folder_id is visible

@param ViewCheckEvent $event
@param string $eventName
@param EventDispatcherInterface $dispatcher
Check if is a folder view and if folder_id is visible