當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Builder\TreeBuilder類代碼示例

本文整理匯總了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;
 }
開發者ID:hason,項目名稱:paymentsuite,代碼行數:10,代碼來源:Configuration.php

示例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;
 }
開發者ID:LamaDelRay,項目名稱:test_symf,代碼行數:12,代碼來源:Configuration.php

示例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;
 }
開發者ID:Neodork,項目名稱:SonataNewsBundle,代碼行數:10,代碼來源:Configuration.php

示例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;
 }
開發者ID:eko,項目名稱:googletranslatebundle,代碼行數:10,代碼來源:Configuration.php

示例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;
 }
開發者ID:codecloud,項目名稱:symfony-shopify-bundle,代碼行數:12,代碼來源:Configuration.php

示例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;
 }
開發者ID:bravesheep,項目名稱:flysystem-url-bundle,代碼行數:10,代碼來源:Configuration.php

示例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;
 }
開發者ID:xoeoro,項目名稱:bytehand-bundle,代碼行數:10,代碼來源:Configuration.php

示例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;
 }
開發者ID:hddbogdan,項目名稱:react-integration-bundle,代碼行數:12,代碼來源:Configuration.php

示例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;
 }
開發者ID:1001pharmacies,項目名稱:tagcommander-bundle,代碼行數:10,代碼來源:Configuration.php

示例10: getConfigTreeBuilder

 public function getConfigTreeBuilder()
 {
     $treeBuilder = new TreeBuilder();
     $rootNode = $treeBuilder->root($this->rootNodeName);
     $this->addConnectionsSection($rootNode);
     return $treeBuilder;
 }
開發者ID:nlescure,項目名稱:ezpublish-kernel,代碼行數:7,代碼來源:Configuration.php

示例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;
 }
開發者ID:spinx,項目名稱:symfony2-sidekiq-example-app,代碼行數:10,代碼來源:Configuration.php

示例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;
 }
開發者ID:Haehnchen,項目名稱:idea-badge,代碼行數:10,代碼來源:Configuration.php

示例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;
 }
開發者ID:hd-deman,項目名稱:elcodi,代碼行數:10,代碼來源:Configuration.php

示例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;
 }
開發者ID:morbicer,項目名稱:converter-bundle,代碼行數:10,代碼來源:Configuration.php

示例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;
 }
開發者ID:itkg,項目名稱:delay-event-bundle,代碼行數:10,代碼來源:Configuration.php


注:本文中的Symfony\Component\Config\Definition\Builder\TreeBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。