PHP code example of lesha724 / yii2-bootstrap-tree

1. Go to this page and download the library: Download lesha724/yii2-bootstrap-tree 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/ */

    

lesha724 / yii2-bootstrap-tree example snippets




// Example of data. $items structure https://github.com/patternfly/patternfly-bootstrap-treeview#data-structure
$items = [
    [
        'text' => 'Node 1'
        'icon' => "glyphicon glyphicon-stop",
        'selectedIcon' => "glyphicon glyphicon-stop",
        'href' => "#node-1",
        'selectable' => true,
        'state' => [
            'checked' => true,
            'disabled' => true,
            'expanded' => true,
            'selected' => true
        ],
        'tags' => ['available'],
        ...,
        'nodes'=>
        [
            ...
        ]
    ],
    [
        'text' => 'Folder 2',
        'nodes' => [
            ['text' => 'Node 2.1'],
            ['text' => 'Node 2.2']
        ]
    ]
];

php composer.phar