<commit_before><?php

namespace PHPOrchestra\BackofficeBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
 * Class TinymceCompilerPass
 */
class TinymceCompilerPass implements CompilerPassInterface
{
    /**
     * You can modify the container here before it is dumped to PHP code.
     *
     * @param ContainerBuilder $container
     */
    public function process(ContainerBuilder $container)
    {
        if ($container->hasDefinition('twig.extension.stfalcon_tinymce')) {
            $param = $container->getParameter('stfalcon_tinymce.config');

            $param['tinymce_jquery'] = false;
            $param['include_jquery'] = false;
            $param['selector'] = ".tinymce";
            $param['theme'] = array(
                'simple' => array(
                    "theme"        => "modern",
                    "plugins"      => array(
                        "advlist autolink lists link image charmap print preview hr anchor pagebreak",
                        "searchreplace wordcount visualblocks visualchars code fullscreen",
                        "insertdatetime media nonbreaking save table contextmenu directionality",
                        "emoticons template paste textcolor"
                    ),
                    "toolbar1"     => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link",
                    "toolbar2"     => "print preview | forecolor backcolor",
                    "menubar"      => false,
                    "image_advtab" => true,
                )
            );

            $container->setParameter('stfalcon_tinymce.config', $param);
        }
    }
}<commit_msg>Fix Tiny MCE menu bug<commit_after><?php

namespace PHPOrchestra\BackofficeBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
 * Class TinymceCompilerPass
 */
class TinymceCompilerPass implements CompilerPassInterface
{
    /**
     * You can modify the container here before it is dumped to PHP code.
     *
     * @param ContainerBuilder $container
     */
    public function process(ContainerBuilder $container)
    {
        if ($container->hasDefinition('twig.extension.stfalcon_tinymce')) {
            $param = $container->getParameter('stfalcon_tinymce.config');

            $param['tinymce_jquery'] = false;
            $param['include_jquery'] = false;
            $param['selector'] = ".tinymce";
            $param['theme'] = array(
                'simple' => array(
                    "theme"        => "modern",
                    "plugins"      => array(
                        "advlist autolink lists link image charmap print preview hr anchor pagebreak",
                        "searchreplace wordcount visualblocks visualchars code fullscreen",
                        "insertdatetime media nonbreaking save table contextmenu directionality",
                        "emoticons template paste textcolor"
                    ),
                    "toolbar1"     => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link",
                    "toolbar2"     => "print preview | forecolor backcolor",
                    "menubar"      => false,
                )
            );

            $container->setParameter('stfalcon_tinymce.config', $param);
        }
    }
}
{'fraction_non_alphanumeric': 0.09314538419016032, 'fraction_numerical': 0.001105583195135434, 'mean_word_length': 2.072156196943973, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7661031', 'n_tokens_mistral': 917, 'n_tokens_neox': 861, 'n_words': 212}