Skip to content

Instantly share code, notes, and snippets.

@kozog
Created May 7, 2012 14:45
Show Gist options
  • Save kozog/2628169 to your computer and use it in GitHub Desktop.
Save kozog/2628169 to your computer and use it in GitHub Desktop.
My configuration
<?php
class Configuration implements ConfigurationInterface
{
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('kp_media');
$rootNode->children()
->arrayNode('linkmap')
->prototype('array')
->useAttributeAsKey('linkmap')
->prototype('variable')
->end()
->end()
->end()
->arrayNode('uploader')->children()
->scalarNode('media_path')->defaultValue('media')->end()
->end()->end()
->arrayNode('imager')->isRequired()
->children()->arrayNode('options')->children()
->scalarNode('lib')->defaultValue('gd')->end()
->arrayNode('thumbnails')
->prototype('array')
->useAttributeAsKey('name')
->prototype('variable')->end()
->end()
->end()
->end()
// ->end()
->end();
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
// more information on that topic.
return $treeBuilder;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment