PHP code example of coolcsn / csn-acl-navigation

1. Go to this page and download the library: Download coolcsn/csn-acl-navigation 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/ */

    

coolcsn / csn-acl-navigation example snippets

./config/application.config.php

'modules' => array(
    'Application',
    'DoctrineModule',
    'DoctrineORMModule',
    'CsnUser',
	'CsnAuthorization',
    'CsnAclNavigation'
)

	array(
                 'label' => 'Album', // 'Page #1',
                 'route' => 'album', // 'page-1',
				 'action'     => 'index',
				 'controller' => 'index',
				 'resource'	=> 'Album\Controller\Album',
				 'privilege'	=> 'index',
                 'pages' => array(
                     array(
                         'label' => 'Add', // 'Child #1',
                         'route' => 'album',
						 'params' => array('action' => 'add'),
						 'resource'	=> 'Album\Controller\Album',
						 'privilege'	=> 'add',
                     ),
                 ),
             ),

 echo $this->navigation('navigation')->menu(); 

 echo $this->navigation('navigation')->menu()->setUlClass('nav navbar-nav');