PHP code example of c975l / toolbar-bundle

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

    

c975l / toolbar-bundle example snippets



class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...
            new c975L\ToolbarBundle\c975LToolbarBundle(),
        ];
    }
}


//...
    $tools = $this->renderView('LOCATION_OF_YOUR_TEMPLATE_DEFINED_ABOVE', array(
        'type' => 'YOUR_TYPE',
        'object' => YOUR_OBJECT_IF_NEEDED,
    ));
    $toolbar = $this->renderView('@c975LToolbar/toolbar.html.twig', array(
        'tools' => $tools,
        'size' => 'YOUR_SIZE',
        'alignment' => 'YOUR_ALIGNMENT',
    ));