本文整理汇总了PHP中Symfony\Component\Config\Definition\Builder\TreeBuilder类的典型用法代码示例。如果您正苦于以下问题:PHP TreeBuilder类的具体用法?PHP TreeBuilder怎么用?PHP TreeBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TreeBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getConfigTreeBuilder
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('bankwire');
$rootNode->children()->scalarNode('controller_route')->defaultValue('/payment/bankwire/execute')->end()->arrayNode('payment_success')->children()->scalarNode('route')->isRequired()->cannotBeEmpty()->end()->booleanNode('order_append')->defaultTrue()->end()->scalarNode('order_append_field')->defaultValue('order_id')->end()->end()->end()->end();
return $treeBuilder;
}
示例2: getConfigTreeBuilder
/**
* Generates the configuration tree.
*
* @return \Symfony\Component\Config\Definition\Builder\TreeBuilder
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('sonata_doctrine_orm_admin', 'array');
$rootNode->children()->scalarNode('entity_manager')->defaultNull()->end()->arrayNode('audit')->addDefaultsIfNotSet()->children()->booleanNode('force')->defaultTrue()->end()->end()->end()->arrayNode('templates')->addDefaultsIfNotSet()->children()->arrayNode('form')->prototype('scalar')->end()->defaultValue(array('SonataDoctrineORMAdminBundle:Form:form_admin_fields.html.twig'))->end()->arrayNode('filter')->prototype('scalar')->end()->defaultValue(array('SonataDoctrineORMAdminBundle:Form:filter_admin_fields.html.twig'))->end()->arrayNode('types')->children()->arrayNode('list')->useAttributeAsKey('name')->prototype('scalar')->end()->end()->arrayNode('show')->useAttributeAsKey('name')->prototype('scalar')->end()->end()->end()->end()->end()->end()->end();
return $treeBuilder;
}
示例3: getConfigTreeBuilder
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('sonata_news');
$rootNode->children()->scalarNode('title')->isRequired()->end()->scalarNode('link')->isRequired()->end()->scalarNode('description')->isRequired()->end()->scalarNode('permalink_generator')->defaultValue('sonata.news.permalink.date')->end()->scalarNode('salt')->isRequired()->end()->arrayNode('permalink')->addDefaultsIfNotSet()->children()->scalarNode('date')->defaultValue('%%1$04d/%%2$d/%%3$d/%%4$s')->end()->end()->end()->arrayNode('table')->addDefaultsIfNotSet()->children()->scalarNode('post_tag')->defaultValue('news__post_tag')->end()->end()->end()->arrayNode('class')->addDefaultsIfNotSet()->children()->scalarNode('tag')->defaultValue('Application\\Sonata\\ClassificationBundle\\Entity\\Tag')->end()->scalarNode('collection')->defaultValue('Application\\Sonata\\ClassificationBundle\\Entity\\Collection')->end()->scalarNode('post')->defaultValue('Application\\Sonata\\NewsBundle\\Entity\\Post')->end()->scalarNode('comment')->defaultValue('Application\\Sonata\\NewsBundle\\Entity\\Comment')->end()->scalarNode('media')->defaultValue('Application\\Sonata\\MediaBundle\\Entity\\Media')->end()->scalarNode('user')->defaultValue('Application\\Sonata\\UserBundle\\Entity\\User')->end()->end()->end()->arrayNode('admin')->addDefaultsIfNotSet()->children()->arrayNode('post')->addDefaultsIfNotSet()->children()->scalarNode('class')->cannotBeEmpty()->defaultValue('Sonata\\NewsBundle\\Admin\\PostAdmin')->end()->scalarNode('controller')->cannotBeEmpty()->defaultValue('SonataAdminBundle:CRUD')->end()->scalarNode('translation')->cannotBeEmpty()->defaultValue('SonataNewsBundle')->end()->end()->end()->arrayNode('comment')->addDefaultsIfNotSet()->children()->scalarNode('class')->cannotBeEmpty()->defaultValue('Sonata\\NewsBundle\\Admin\\CommentAdmin')->end()->scalarNode('controller')->cannotBeEmpty()->defaultValue('SonataNewsBundle:CommentAdmin')->end()->scalarNode('translation')->cannotBeEmpty()->defaultValue('SonataNewsBundle')->end()->end()->end()->end()->end()->arrayNode('comment')->children()->arrayNode('notification')->children()->arrayNode('emails')->prototype('scalar')->cannotBeEmpty()->end()->end()->scalarNode('from')->cannotBeEmpty()->end()->scalarNode('template')->cannotBeEmpty()->end()->end()->end()->end()->end()->end();
return $treeBuilder;
}
示例4: getConfigTreeBuilder
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('eko_google_translate');
$rootNode->children()->scalarNode('api_key')->isRequired()->end()->end();
return $treeBuilder;
}
示例5: getConfigTreeBuilder
/**
* Generates the configuration tree builder for the shopify configuration entries
*
* @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('codecloud_shopify');
$rootNode->children()->arrayNode('credentials')->cannotBeEmpty()->children()->scalarNode('api_key')->cannotBeEmpty()->end()->scalarNode('shared_secret')->cannotBeEmpty()->end()->end()->end()->arrayNode('oauth')->children()->scalarNode('step1')->cannotBeEmpty()->end()->scalarNode('step2')->cannotBeEmpty()->end()->scalarNode('step3')->cannotBeEmpty()->end()->end()->end()->arrayNode('twig')->children()->scalarNode('enabled_embedded_helpers')->end()->end()->end()->end();
return $treeBuilder;
}
示例6: getConfigTreeBuilder
/**
* @inheritDoc
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('bravesheep_flysystem_url');
$rootNode->children()->arrayNode('encoders')->addDefaultsIfNotSet()->children()->arrayNode('public_url_prefix')->addDefaultsIfNotSet()->children()->scalarNode('default')->defaultNull()->end()->scalarNode('web_dir')->defaultValue('%kernel.root_dir%/../web')->end()->end()->end()->end()->end()->arrayNode('urls')->prototype('array')->children()->scalarNode('url')->isRequired()->end()->scalarNode('prefix')->isRequired()->end()->arrayNode('encoders')->prototype('scalar')->end()->defaultValue(['oneup_flysystem', 'public_url_prefix'])->end()->end()->end()->end()->end();
return $treeBuilder;
}
示例7: getConfigTreeBuilder
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('xoeoro_bytehand');
$rootNode->children()->scalarNode('id')->isRequired()->end()->scalarNode('key')->isRequired()->end()->scalarNode('from')->defaultValue('SMS-INFO')->end()->end();
return $treeBuilder;
}
示例8: getConfigTreeBuilder
/**
* Generates the configuration tree.
*
* @return TreeBuilder
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('react_integration');
$rootNode->children()->integerNode('test1')->end()->booleanNode('test2')->end()->end();
return $treeBuilder;
}
示例9: getConfigTreeBuilder
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('meup_tagcommander');
$rootNode->children()->scalarNode('default_event')->defaultValue('default')->end()->arrayNode('datalayer')->children()->scalarNode('name')->defaultValue('tc_vars')->end()->variableNode('default')->end()->end()->end()->arrayNode('containers')->isRequired()->requiresAtLeastOneElement()->prototype('array')->children()->scalarNode('name')->isRequired()->end()->scalarNode('script')->isRequired()->end()->scalarNode('version')->defaultValue('')->end()->scalarNode('alternative')->defaultValue('')->end()->end()->end()->end()->arrayNode('events')->isRequired()->requiresAtLeastOneElement()->prototype('array')->children()->scalarNode('name')->end()->scalarNode('function')->end()->end()->end()->end()->end();
return $treeBuilder;
}
示例10: getConfigTreeBuilder
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root($this->rootNodeName);
$this->addConnectionsSection($rootNode);
return $treeBuilder;
}
示例11: getConfigTreeBuilder
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('d_labs_worker');
$rootNode->children()->arrayNode('redis')->prototype('array')->children()->scalarNode('client')->end()->end()->end()->end();
return $treeBuilder;
}
示例12: getConfigTreeBuilder
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('espend_idea_badge');
$rootNode->children()->scalarNode('badge_lifetime')->defaultValue(3600)->end()->scalarNode('route_path')->defaultValue('/badge/{id}/{provider}')->end()->scalarNode('badge_controller')->defaultValue('espend_idea_badge_bundle.badge.controller:showAction')->end()->scalarNode('monthly_storage_path')->isRequired()->end()->end();
return $treeBuilder;
}
示例13: getConfigTreeBuilder
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root(ElcodiNewsletterExtension::getExtensionName());
$rootNode->children()->arrayNode('mapping')->addDefaultsIfNotSet()->children()->arrayNode('newsletter_subscription')->addDefaultsIfNotSet()->children()->scalarNode('class')->defaultValue('Elcodi\\Component\\Newsletter\\Entity\\NewsletterSubscription')->cannotBeEmpty()->end()->scalarNode('mapping_file')->defaultValue('@ElcodiNewsletterBundle/Resources/config/doctrine/NewsletterSubscription.orm.yml')->cannotBeEmpty()->end()->scalarNode('manager')->defaultValue('default')->cannotBeEmpty()->end()->end()->end()->end()->end()->end();
return $treeBuilder;
}
示例14: getConfigTreeBuilder
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('morbicer_converter');
$rootNode->children()->scalarNode('default_provider')->defaultValue('chain')->cannotBeEmpty()->end()->arrayNode('providers')->children()->arrayNode('google')->end()->arrayNode('yahoo')->end()->arrayNode('currency_api')->prototype('scalar')->end()->end()->arrayNode('chain')->prototype('scalar')->end()->end()->end()->end()->end();
return $treeBuilder;
}
示例15: getConfigTreeBuilder
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('itkg_delay_event');
$rootNode->fixXmlConfig('channel')->children()->arrayNode('processor')->children()->arrayNode('retry_count')->children()->scalarNode('normal')->defaultValue(1)->end()->scalarNode('critic')->defaultValue(1)->end()->end()->end()->end()->end()->arrayNode('events')->prototype('array')->children()->enumNode('type')->values(['normal', 'critic'])->defaultValue('normal')->end()->end()->end()->end()->arrayNode('channels')->addDefaultChildrenIfNoneSet('default')->useAttributeAsKey('name')->prototype('array')->children()->integerNode('events_limit_per_run')->defaultNull()->min(0)->end()->integerNode('duration_limit_per_run')->defaultNull()->min(0)->end()->arrayNode('include')->prototype('scalar')->end()->end()->arrayNode('exclude')->prototype('scalar')->end()->end()->end()->end()->end();
return $treeBuilder;
}