PHP code example of happydemon / elements

1. Go to this page and download the library: Download happydemon/elements 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/ */

    

happydemon / elements example snippets


<? if ($user->get_role() === Role::ANONYMOUS):

<?
return [
'items' => [
            'url'     => 'home',
            'title'   => 'Home',
        ],
        [
            'route'     => 'about',
            'title'   => 'About',
        ],
];


Kohana::modules(array(
	...
	'elements' => MODPATH.'elements',
));

	$element = Element::factory($role); // this could use `config/navigation/(user|admin).php`

	$element->set_current('article/show');

	$element->last_item('editing user "happyDemon"');
javascript
{
	".4.0",
		"composer/installers": "*",
		"happyDemon/elements":"*"
	}
}