PHP code example of sjmaceyful / bem-nav-walker

1. Go to this page and download the library: Download sjmaceyful/bem-nav-walker 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/ */

    

sjmaceyful / bem-nav-walker example snippets


 bem_menu('menu_location', 'my-menu', 'my-modifier'); 

 bem_menu('menu_location', 'my-menu', array('my-modifier','my-other-modifier')) 

$this->item_css_classes = array(
    'item'                      => '__item',
    'parent_item'               => '__item--parent',
    'active_item'               => '__item--active',
    'parent_of_active_item'     => '__item--parent--active',
    'ancestor_of_active_item'   => '__item--ancestor--active',
    'link'                      => '__link',
    'sub_menu'                  => '__sub-menu',
    'sub_menu_item'             => '__sub-menu__item'
);