Add a width and height configuration parameter and fix the form theming
so that it works.
This commit is contained in:
33
DependencyInjection/Configuration.php
Normal file
33
DependencyInjection/Configuration.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Gregwar\CaptchaBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
class Configuration implements ConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* Generates the configuration tree.
|
||||
* @return TreeBuilder
|
||||
*/
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('gregwar_captcha', 'array');
|
||||
|
||||
$rootNode
|
||||
->children()
|
||||
->arrayNode('image')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->scalarNode('width')->defaultValue(120)->end()
|
||||
->scalarNode('height')->defaultValue(40)->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user