PHP code example of survos / bootstrap-bundle

1. Go to this page and download the library: Download survos/bootstrap-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

survos / bootstrap-bundle example snippets


    #[AsEventListener(event: KnpMenuEvent::NAVBAR_MENU2, priority: 50)]
    public function navarButtonsMenu(KnpMenuEvent $event): void
    {
        $menu = $event->getMenu();
        $this->add($menu, 'app_homepage');
        $this->add($menu, 'event_index');
    }

    #[AsEventListener(event: KnpMenuEvent::NAVBAR_MENU)]
    public function navbarMenu(KnpMenuEvent $event): void
    {
        if (!$this->supports($event)) {
            return;
        }
    }


            if ($this->isGranted('ROLE_SUPER_ADMIN')) {
                $subMenu = $this->addSubmenu($menu, 'super_admin_index');
                $this->add($subMenu, 'owner_references', $owner);
                $this->add($subMenu, 'owner_dump', $owner, external: true);
yaml
survos_bootstrap:
  routes:
      login: app_login
      logout: app_logout
      register: app_register
      homepage: app_homepage
  menu_options:
      entityClass: null
      project: null
      frontPage: false
      showAppMenu: false