当前位置: 首页>>代码示例>>PHP>>正文


PHP NodeBuilder::variableNode方法代码示例

本文整理汇总了PHP中Symfony\Component\Config\Definition\Builder\NodeBuilder::variableNode方法的典型用法代码示例。如果您正苦于以下问题:PHP NodeBuilder::variableNode方法的具体用法?PHP NodeBuilder::variableNode怎么用?PHP NodeBuilder::variableNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Config\Definition\Builder\NodeBuilder的用法示例。


在下文中一共展示了NodeBuilder::variableNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createAddPackageTaskNodes

 /**
  * Add the nodes for the "add-package" task.
  *
  * @param NodeBuilder $tasks The node builder.
  *
  * @return void
  *
  * @throws \InvalidArgumentException Will be thrown by the nodes when the input was invalid.
  */
 private function createAddPackageTaskNodes(NodeBuilder $tasks)
 {
     $tasks->scalarNode('name')->info('The name of the package to include.')->cannotBeEmpty()->validate()->always($this->enforceTypeStringCheck('Invalid package name %s'));
     $tasks->scalarNode('include_require')->info('The dependencies to include or true to include all.')->cannotBeEmpty()->defaultTrue()->validate()->always($this->enforceTypeArrayOrBoolCheck('Invalid value for include_require: %s'));
     $tasks->scalarNode('include_requiredev')->info('The dev dependencies to include or true to include all.')->cannotBeEmpty()->defaultFalse()->validate()->always($this->enforceTypeArrayOrBoolCheck('Invalid value for include_requiredev: %s'));
     $tasks->arrayNode('exclude_dependencies')->prototype('scalar')->info('The dependencies to exclude.')->cannotBeEmpty()->defaultValue([])->validate()->always($this->enforceTypeStringCheck('Invalid value for exclude_dependencies: %s'));
     $tasks->arrayNode('include_files')->prototype('scalar')->info('The files to include.')->cannotBeEmpty()->defaultValue([])->validate()->always($this->enforceTypeStringCheck('Invalid value for include_files: %s'));
     $tasks->arrayNode('exclude_files')->prototype('scalar')->info('The files to exclude.')->cannotBeEmpty()->defaultValue([])->validate()->always($this->enforceTypeStringCheck('Invalid value for exclude_files: %s'));
     $tasks->arrayNode('rewrite_paths')->prototype('scalar')->info('The paths to rewrite.')->cannotBeEmpty()->defaultValue([])->validate()->always($this->enforceTypeStringCheck('Invalid value for rewrite_paths: %s'));
     $tasks->variableNode('package_override')->info('The values to override for certain packages.')->cannotBeEmpty()->defaultValue([])->validate()->always($this->createPackageOverrideMangler());
 }
开发者ID:cyberspectrum,项目名称:pharpiler,代码行数:20,代码来源:Configuration.php

示例2: appendDataGridDefinition

 /**
  * @param NodeBuilder $dataGridDefinition
  */
 protected function appendDataGridDefinition(NodeBuilder $dataGridDefinition)
 {
     $dataGridDefinition->variableNode('filter_config')->end()->scalarNode('form_theme')->defaultNull()->end()->scalarNode('parent')->defaultNull()->end()->scalarNode('renderer')->defaultNull()->end()->variableNode('actions')->end()->variableNode('submit_button')->defaultValue([])->end()->variableNode('reset_button')->defaultValue([])->end()->arrayNode('columns')->prototype('array')->children()->scalarNode('template')->defaultNull()->end()->scalarNode('sort_column')->defaultNull()->end()->scalarNode('property_path')->defaultNull()->end()->scalarNode('label')->defaultNull()->end()->scalarNode('renderer')->defaultNull()->end()->variableNode('formatting_options')->defaultValue([])->end()->end()->end()->end();
 }
开发者ID:VincentChalnot,项目名称:SidusDataGridBundle,代码行数:7,代码来源:Configuration.php


注:本文中的Symfony\Component\Config\Definition\Builder\NodeBuilder::variableNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。