-
-
Save ideadapt/1626913 to your computer and use it in GitHub Desktop.
$formMapper | |
->with('General') | |
->add('title') | |
->add('blog', 'textarea', array('attr' => array('class' => 'tinymce', 'tinymce'=>'{"theme":"simple"}'))) |
no problem with quotes and i use latest version of sonata bundle
it simply does not return css class in array.
i wrote array(‘attr’ => array(‘class’ => ‘tinymce’));
nothing (((
only return class="sonata-medium"
i don't know what to do
found class
vendor\bundles\Sonata\AdminBundle\Form\Extension\Field\Type\FormTypeFieldExtension.php
string 110 $attr = $view->get('attr', array());
this class does not get attr param from formMapper why? and how to debug it....
To debug you can write to a logger and check the logfile after the request. See http://symfony.com/doc/current/cookbook/logging/monolog.html. Or you could debug your php code using xdebug ...
I have the FormTypeFieldExtension.php file too, with the same content as you do. I didnt change it.
Maybe its a problem with the quotes. In my original gist I somehow pasted with wrong quotes (e.g. ” instead of "). The updated version should be correct. If it still does not work make sure if your php code is actually being invoked.