PHP code example of blast-project / utils-bundle

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

    

blast-project / utils-bundle example snippets




namespace MyBundle\Hook\MyCustomHook;

use Blast\UtilsBundle\Hook\AbstractHook;

class MyCustomHookExample extends AbstractHook
{
    protected $hookName = 'my.custom.hook';
    protected $template = 'MyBundle:Hook:my_custom_hook_example.html.twig';

    public function handleParameters($hookParameters)
    {
        $this->templateParameters = [
            'someViewParameter' => 'a value that will be passed to the twig view'
        ];
    }
}