PHP code example of gnugat / redaktilo-bundle

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

    

gnugat / redaktilo-bundle example snippets



// File: app/AppKernel.php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        return array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Gnugat\RedaktiloBundle\GnugatRedaktiloBundle(),
        );
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}



use Gnugat\RedaktiloBundle\DependencyInjection\CommandCompilerPass;
use Gnugat\RedaktiloBundle\DependencyInjection\SearchStrategyCompilerPass;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

$container = new ContainerBuilder();
$fileLocator = new FileLocator(__DIR__.'/vendor/gnugat/redaktilo/Resources/config');
$loader = new YamlFileLoader($container, $fileLocator);

$loader->load('services.yml');
$container->addCompilerPass(new SearchStrategyCompilerPass());
$container->addCompilerPass(new CommandCompilerPass());