示例#1
0
 private function getRootNode()
 {
     $nodeBuilder = new NodeBuilder();
     $rootNode = $nodeBuilder->arrayNode(null);
     $this->addConfiguration($rootNode);
     return $rootNode->getNode();
 }
 private function addVisitorsSection(NodeBuilder $builder)
 {
     $builder->arrayNode('visitors')->addDefaultsIfNotSet()->children()->arrayNode('json')->addDefaultsIfNotSet()->children()->scalarNode('options')->defaultValue(0)->beforeNormalization()->ifArray()->then(function ($v) {
         $options = 0;
         foreach ($v as $option) {
             if (is_numeric($option)) {
                 $options |= (int) $option;
             } elseif (defined($option)) {
                 $options |= constant($option);
             } else {
                 throw new InvalidArgumentException('Expected either an integer representing one of the JSON_ constants, or a string of the constant itself.');
             }
         }
         return $options;
     })->end()->beforeNormalization()->ifString()->then(function ($v) {
         if (is_numeric($v)) {
             $value = (int) $v;
         } elseif (defined($v)) {
             $value = constant($v);
         } else {
             throw new InvalidArgumentException('Expected either an integer representing one of the JSON_ constants, or a string of the constant itself.');
         }
         return $value;
     })->end()->validate()->always(function ($v) {
         if (!is_int($v)) {
             throw new InvalidArgumentException('Expected either integer value or a array of the JSON_ constants.');
         }
         return $v;
     })->end()->end()->end()->end()->arrayNode('xml')->fixXmlConfig('whitelisted-doctype', 'doctype_whitelist')->addDefaultsIfNotSet()->children()->arrayNode('doctype_whitelist')->prototype('scalar')->end()->end()->end()->end()->end()->end();
 }
 private function addDirectives(NodeBuilder $node)
 {
     $directives = array('default', 'script', 'object', 'style', 'img', 'media', 'frame', 'font', 'connect');
     foreach ($directives as $directive) {
         $node->arrayNode($directive)->prototype('scalar')->end();
     }
     return $node;
 }
 /**
  * @param NodeBuilder $node
  *
  * @return $this
  */
 public function addTypes(NodeBuilder $node)
 {
     // @formatter:off
     /** @noinspection PhpUndefinedMethodInspection */
     $node->arrayNode('types')->prototype('array')->addDefaultsIfNotSet()->children()->arrayNode('assets')->defaultValue([])->prototype('array')->children()->scalarNode('src')->isRequired()->end()->scalarNode('inline')->defaultFalse()->end()->end()->end()->end()->arrayNode('groups')->defaultValue([])->prototype('array')->children()->booleanNode('default')->defaultFalse()->end()->arrayNode('assets')->prototype('scalar')->end()->end()->arrayNode('routes')->defaultValue([])->prototype('scalar')->end()->end()->end()->end()->end()->end()->end();
     // @formatter:on
     return $this;
 }
 /**
  * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $node
  */
 private function addClientConfiguration(NodeBuilder $node)
 {
     $node->scalarNode('id')->isRequired()->cannotBeEmpty()->info('Your Billomat Id')->example('company_name');
     $node->scalarNode('api_key')->isRequired()->cannotBeEmpty()->info('Your Billomat API key')->example('12345abc67890def12345abc67890def');
     $children = $node->arrayNode('application')->addDefaultsIfNotSet()->children();
     $this->addApplicationConfiguration($children);
     $node->booleanNode('wait_for_rate_limit_reset')->defaultFalse()->info('Wait for rate limit reset if rate limit is reached during a request');
     $node->booleanNode('async')->defaultFalse()->info('Use asynchronous requests with the Guzzle Async Plugin');
 }
示例#6
0
 /**
  * Adds semantic configuration definition.
  *
  * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system.<siteaccess>
  */
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $nodeBuilder->arrayNode('imagemagick')->info('DEPRECATED.')->children()->scalarNode('pre_parameters')->info('Parameters that must be run BEFORE the filenames and filters')->end()->scalarNode('post_parameters')->info('Parameters that must be run AFTER the filenames and filters')->end()->end()->end()->arrayNode('image_variations')->info('Configuration for your image variations (aka "image aliases")')->example(array('my_image_variation' => array('reference' => '~', 'filters' => array(array('name' => 'geometry/scaledownonly', 'params' => array(400, 350)))), 'my_cropped_variation' => array('reference' => 'my_image_variation', 'filters' => array(array('name' => 'geometry/scalewidthdownonly', 'params' => array(300)), array('name' => 'geometry/crop', 'params' => array(300, 300, 0, 0))))))->useAttributeAsKey('variation_name')->normalizeKeys(false)->prototype('array')->children()->scalarNode('reference')->info('Tells the system which original variation to use as reference image. Defaults to original')->example(array('reference' => 'large'))->end()->arrayNode('filters')->info('A list of filters to run, each filter must be supported by the active image converters')->useAttributeAsKey('name')->normalizeKeys(false)->prototype('array')->info('Array/Hash of parameters to pass to the filter')->useAttributeAsKey('options')->beforeNormalization()->ifTrue(function ($v) {
         // Check if passed array only contains a "params" key (BC with <=5.3).
         return is_array($v) && count($v) === 1 && isset($v['params']);
     })->then(function ($v) {
         // If we have the "params" key, just use the value.
         return $v['params'];
     })->end()->prototype('variable')->end()->end()->end()->arrayNode('post_processors')->info('Post processors as defined in LiipImagineBundle. See https://github.com/liip/LiipImagineBundle/blob/master/Resources/doc/filters.md#post-processors')->useAttributeAsKey('name')->prototype('array')->useAttributeAsKey('name')->prototype('variable')->end()->end()->end()->end()->end()->end();
 }
示例#7
0
    /**
     * Adds semantic configuration definition.
     *
     * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system.<siteaccess>
     *
     * @return void
     */
    public function addSemanticConfig(NodeBuilder $nodeBuilder)
    {
        $nodeBuilder->arrayNode(static::NODE_KEY)->info(static::INFO)->children()->arrayNode('block')->useAttributeAsKey("key")->normalizeKeys(false)->prototype("array")->children()->scalarNode("template")->isRequired()->info("Your template path, as MyBundle:subdir:my_template.html.twig")->end()->scalarNode('controller')->info(<<<EOT
Use custom controller instead of the default one to display a block matching your rules.
You can use the controller reference notation supported by Symfony.
EOT
)->example('MyBundle:MyControllerClass:viewBlock')->end()->arrayNode("match")->info("Condition matchers configuration")->useAttributeAsKey("key")->prototype("variable")->end()->end()->end()->end()->end()->end()->beforeNormalization()->always()->then(function ($v) {
            return array('block' => $v);
        })->end()->end();
    }
示例#8
0
 protected function getRelationFieldsNodeDefinition($level = 1)
 {
     $nodeBuilder = new NodeBuilder();
     $relationFieldsNode = $nodeBuilder->arrayNode('relation_fields');
     if ($level < self::RELATION_FIELDS_NODE_MAX_LEVEL) {
         $relationFieldsNode->prototype('array')->children()->scalarNode('name')->end()->enumNode('target_type')->values($this->targetTypes)->end()->arrayNode('target_fields')->prototype('scalar')->end()->end()->enumNode('relation_type')->values($this->relationTypes)->end()->append($this->getRelationFieldsNodeDefinition($level + 1))->end()->validate()->ifTrue(function ($value) {
             return !empty($value['relation_type']) && empty($value['relation_fields']) || !empty($value['relation_fields']) && empty($value['relation_type']);
         })->thenInvalid('Both or none of relation_type and relation_fields should be specified for field')->end()->end();
     }
     return $relationFieldsNode;
 }
示例#9
0
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $fieldTypeNodeBuilder = $nodeBuilder->arrayNode("fieldtypes")->children();
     // Delegate to configuration parsers
     foreach ($this->configParsers as $parser) {
         if ($parser instanceof FieldTypeParserInterface) {
             $parser->addSemanticConfig($fieldTypeNodeBuilder);
         } else {
             $parser->addSemanticConfig($nodeBuilder);
         }
     }
 }
示例#10
0
    /**
     * Adds semantic configuration definition.
     *
     * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system.<siteaccess>
     */
    public function addSemanticConfig(NodeBuilder $nodeBuilder)
    {
        $nodeBuilder->arrayNode(static::NODE_KEY)->info(static::INFO)->useAttributeAsKey("key")->normalizeKeys(false)->prototype("array")->useAttributeAsKey("key")->normalizeKeys(false)->info("View selection rulesets, grouped by view type. Key is the view type (e.g. 'full', 'line', ...)")->prototype("array")->children()->scalarNode("template")->info("Your template path, as MyBundle:subdir:my_template.html.twig")->end()->scalarNode('controller')->info(<<<EOT
Use custom controller instead of the default one to display a content matching your rules.
You can use the controller reference notation supported by Symfony.
EOT
)->example('MyBundle:MyControllerClass:view')->end()->arrayNode("match")->info("Condition matchers configuration")->isRequired()->useAttributeAsKey("key")->prototype("variable")->end()->end()->arrayNode("params")->info(<<<EOT
Arbitrary params that will be passed in the ContentView object, manageable by ViewProviders.
Those params will NOT be passed to the resulting view template by default.
EOT
)->example(array("foo" => "%some.parameter.reference%", "osTypes" => array("osx", "linux", "windows")))->useAttributeAsKey("key")->prototype("variable")->end()->end()->end()->end()->end()->end();
    }
示例#11
0
 /** {@inheritdoc} */
 public static function applyConfiguration(NodeBuilder $node_builder)
 {
     $uglify = $node_builder->arrayNode('uglifyjs')->canBeEnabled()->children();
     $compress = $uglify->arrayNode('compress')->cannotBeEmpty()->addDefaultsIfNotSet()->children();
     foreach (self::$config_map as list($option, $default, $info)) {
         $compress->booleanNode($option)->defaultValue($default)->info($info)->end();
     }
     $compress->arrayNode('global_defs')->info('global definition')->prototype('scalar')->end()->end();
     $uglify->arrayNode('mangle_except')->defaultValue(['$super', '$', 'exports', 'require'])->info('Variable names to not mangle')->prototype('scalar')->end();
     $uglify->booleanNode('source_map')->defaultTrue()->info('The plugin uses SourceMaps to map error message locations to modules. This slows down the compilation')->end();
     $uglify->scalarNode('test')->defaultValue('/\\.js($|\\?)/i')->info('RegExp to filter processed files')->end();
     $uglify->booleanNode('minimize')->defaultTrue()->info('Whether to minimize or not')->end();
 }
示例#12
0
 private function addValidationSection(NodeBuilder $rootNode)
 {
     $rootNode->arrayNode('validation')->canBeUnset()->beforeNormalization()->ifTrue(function ($v) {
         return is_array($v) && !empty($v['annotations']) && !empty($v['namespace']);
     })->then(function ($v) {
         $v['annotations'] = array('namespace' => $v['namespace']);
         unset($v['namespace']);
         return $v;
     })->end()->booleanNode('enabled')->end()->arrayNode('annotations')->canBeUnset()->treatNullLike(array())->treatTrueLike(array())->fixXmlConfig('namespace')->arrayNode('namespaces')->useAttributeAsKey('prefix')->prototype('scalar')->beforeNormalization()->ifTrue(function ($v) {
         return is_array($v) && isset($v['namespace']);
     })->then(function ($v) {
         return $v['namespace'];
     })->end()->end()->end()->end()->end();
 }
 /**
  * @param string      $driver
  * @param NodeBuilder $rootNode
  */
 public function addDriverSettings($driver, NodeBuilder $rootNode)
 {
     $driverNode = $rootNode->arrayNode($driver)->fixXmlConfig('server');
     if ($driver == 'Memcache') {
         $finalNode = $driverNode->info('All options except "servers" are Memcached options. See http://www.php.net/manual/en/memcached.constants.php')->addDefaultsIfNotSet()->children()->booleanNode('compression')->end()->scalarNode('serializer')->end()->scalarNode('prefix_key')->end()->scalarNode('hash')->end()->scalarNode('distribution')->end()->booleanNode('libketama_compatible')->end()->booleanNode('buffer_writes')->end()->booleanNode('binary_protocol')->end()->booleanNode('no_block')->end()->booleanNode('tcp_nodelay')->end()->booleanNode('auto_eject_hosts')->end()->scalarNode('socket_send_size')->end()->scalarNode('socket_recv_size')->end()->scalarNode('connect_timeout')->end()->scalarNode('retry_timeout')->end()->scalarNode('send_timeout')->end()->scalarNode('recv_timeout')->end()->scalarNode('poll_timeout')->end()->booleanNode('cache_lookups')->end()->scalarNode('server_failure_limit')->end()->arrayNode('servers')->info('Your Memcached server(s) configuration.')->requiresAtLeastOneElement()->example(array(array('server' => '127.0.0.1', 'port' => '11211')))->defaultValue(array(array('server' => '127.0.0.1', 'port' => '11211')))->prototype('array')->children()->scalarNode('server')->defaultValue('127.0.0.1')->end()->scalarNode('port')->defaultValue('11211')->end()->scalarNode('weight')->end()->end()->end()->end()->end();
     } elseif ($driver == 'Redis') {
         $finalNode = $driverNode->info("Accepts server info, password, and database.")->addDefaultsIfNotSet()->children()->scalarNode('password')->end()->scalarNode('database')->end()->arrayNode('servers')->info('Configuration of Redis server(s)')->requiresAtLeastOneElement()->example(array(array('server' => '127.0.0.1', 'port' => '6379')))->defaultValue(array(array('server' => '127.0.0.1', 'port' => '6379')))->prototype('array')->children()->scalarNode('server')->defaultValue('127.0.0.1')->end()->scalarNode('port')->defaultValue('6379')->end()->scalarNode('ttl')->end()->booleanNode('socket')->end()->end()->end()->end()->end();
     } else {
         $defaults = isset($this->driverSettings[$driver]) ? $this->driverSettings[$driver] : array();
         $node = $driverNode->addDefaultsIfNotSet()->children();
         foreach ($defaults as $setting => $default) {
             $node->scalarNode($setting)->defaultValue($default)->end();
         }
         $finalNode = $node->end();
     }
     $finalNode->end();
 }
 private function addSiteAccessSettings( NodeBuilder $nodeBuilder )
 {
     $nodeBuilder
         ->arrayNode( 'templating' )
             ->children()
                 ->scalarNode( 'view_layout' )
                     ->info( 'Template reference to use as pagelayout while rendering a content view in legacy' )
                     ->example( 'eZDemoBundle::pagelayout.html.twig' )
                 ->end()
                 ->scalarNode( 'module_layout' )
                     ->info( 'Template reference to use as pagelayout for legacy modules. If not specified, pagelayout from legacy will be used.' )
                 ->end()
             ->end()
         ->end()
         ->booleanNode( 'legacy_mode' )
             ->info( 'Whether to use legacy mode or not. If true, will let the legacy kernel handle url aliases.' )
         ->end();
 }
示例#15
0
 /**
  * Attach the form node to the tree.
  *
  * @param NodeBuilder $nodeBuilder
  */
 private function addFormSection($nodeBuilder)
 {
     $nodeBuilder->arrayNode('form')->addDefaultsIfNotSet()->children()->arrayNode('data_class')->addDefaultsIfNotSet()->children()->scalarNode('seo_metadata')->defaultNull()->end()->end()->end()->end()->end();
 }
 private function addFacebookSettings( NodeBuilder $nodeBuilder )
 {
     $nodeBuilder
         ->arrayNode( 'facebook' )
             ->children()
                 ->scalarNode( 'app_id' )->isRequired()->info( 'Facebook application ID' )->end()
                 ->scalarNode( 'width' )->info( 'Width for the comments box (default is 470)' )->end()
                 ->scalarNode( 'num_posts' )->info( 'Number of comments to display (default is 10)' )->end()
                 ->enumNode( 'color_scheme' )->info( 'Color scheme to use (can be "light" or "dark"). Default is "light"' )->values( array( 'light', 'dark' ) )->end()
                 ->booleanNode( 'include_sdk' )->info( 'Whether to include Facebook JS SDK with the comments rendering. If set to false, you must include it on your own. Default is true.' )->end()
                 ->scalarNode( 'template' )->info( 'Template to use, overriding the built-in one.' )->end()
             ->end()
         ->end();
 }
 /** {@inheritdoc} */
 public static function applyConfiguration(NodeBuilder $node_builder)
 {
     $node_builder->arrayNode('resolve_loader')->addDefaultsIfNotSet()->children()->arrayNode('root')->prototype('scalar')->end()->end()->end();
 }
示例#18
0
 /**
  * Adds semantic configuration definition.
  *
  * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system.<siteaccess>
  *
  * @return void
  */
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $nodeBuilder->arrayNode('content')->info('Content related configuration')->children()->booleanNode('view_cache')->defaultValue(true)->end()->booleanNode('ttl_cache')->defaultValue(true)->end()->scalarNode('default_ttl')->info('Default value for TTL cache, in seconds')->defaultValue(60)->end()->arrayNode('tree_root')->canBeUnset()->children()->integerNode('location_id')->info("Root locationId for routing and link generation.\nUseful for multisite apps with one repository.")->isRequired()->end()->arrayNode('excluded_uri_prefixes')->info("URI prefixes that are allowed to be outside the content tree\n(useful for content sharing between multiple sites).\nPrefixes are not case sensitive")->example(array('/media/images', '/products'))->prototype('scalar')->end()->end()->end()->end()->end()->end()->arrayNode('fieldtypes')->children()->arrayNode('ezxml')->children()->arrayNode('custom_tags')->info('Custom XSL stylesheets to use for XmlText transformation to HTML5. Useful for "custom tags".')->example(array('path' => '%kernel.root_dir%/../src/Acme/TestBundle/Resources/myTag.xsl', 'priority' => 10))->prototype('array')->children()->scalarNode('path')->info('Path of the XSL stylesheet to load.')->isRequired()->end()->integerNode('priority')->info('Priority in the loading order. A high value will have higher precedence in overriding XSL templates.')->defaultValue(0)->end()->end()->end()->end()->end()->end()->arrayNode('ezrichtext')->children()->arrayNode('output_custom_tags')->info('Custom XSL stylesheets to use for RichText transformation to HTML5. Useful for "custom tags".')->example(array('path' => '%kernel.root_dir%/../src/Acme/TestBundle/Resources/myTag.xsl', 'priority' => 10))->prototype('array')->children()->scalarNode('path')->info('Path of the XSL stylesheet to load.')->isRequired()->end()->integerNode('priority')->info('Priority in the loading order. A high value will have higher precedence in overriding XSL templates.')->defaultValue(0)->end()->end()->end()->end()->arrayNode('edit_custom_tags')->info('Custom XSL stylesheets to use for RichText transformation to HTML5. Useful for "custom tags".')->example(array('path' => '%kernel.root_dir%/../src/Acme/TestBundle/Resources/myTag.xsl', 'priority' => 10))->prototype('array')->children()->scalarNode('path')->info('Path of the XSL stylesheet to load.')->isRequired()->end()->integerNode('priority')->info('Priority in the loading order. A high value will have higher precedence in overriding XSL templates.')->defaultValue(0)->end()->end()->end()->end()->arrayNode('input_custom_tags')->info('Custom XSL stylesheets to use for RichText transformation to HTML5. Useful for "custom tags".')->example(array('path' => '%kernel.root_dir%/../src/Acme/TestBundle/Resources/myTag.xsl', 'priority' => 10))->prototype('array')->children()->scalarNode('path')->info('Path of the XSL stylesheet to load.')->isRequired()->end()->integerNode('priority')->info('Priority in the loading order. A high value will have higher precedence in overriding XSL templates.')->defaultValue(0)->end()->end()->end()->end()->end()->end()->end()->end();
 }
示例#19
0
 /**
  * Shared configuration between cache control, tags and invalidation.
  *
  * @param NodeBuilder $rules
  */
 private function addMatch(NodeBuilder $rules)
 {
     $rules->arrayNode('match')->cannotBeOverwritten()->isRequired()->fixXmlConfig('method')->fixXmlConfig('ip')->fixXmlConfig('attribute')->validate()->ifTrue(function ($v) {
         return !empty($v['additional_cacheable_status']) && !empty($v['match_response']);
     })->thenInvalid('You may not set both additional_cacheable_status and match_response.')->end()->validate()->ifTrue(function ($v) {
         return !empty($v['match_response']) && !class_exists('Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage');
     })->thenInvalid('Configured a match_response but ExpressionLanguage is not available')->end()->children()->scalarNode('path')->defaultNull()->info('Request path.')->end()->scalarNode('host')->defaultNull()->info('Request host name.')->end()->arrayNode('methods')->beforeNormalization()->ifString()->then(function ($v) {
         return preg_split('/\\s*,\\s*/', $v);
     })->end()->useAttributeAsKey('name')->prototype('scalar')->end()->info('Request HTTP methods.')->end()->arrayNode('ips')->beforeNormalization()->ifString()->then(function ($v) {
         return preg_split('/\\s*,\\s*/', $v);
     })->end()->useAttributeAsKey('name')->prototype('scalar')->end()->info('List of client IPs.')->end()->arrayNode('attributes')->useAttributeAsKey('name')->prototype('scalar')->end()->info('Regular expressions on request attributes.')->end()->arrayNode('additional_cacheable_status')->prototype('scalar')->end()->info('Additional response HTTP status codes that will match.')->end()->scalarNode('match_response')->defaultNull()->info('Expression to decide whether response should be matched. Replaces HTTP code check and additional_cacheable_status.')->end()->end()->end();
 }
示例#20
0
 /**
  * Adds semantic configuration definition.
  *
  * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system.<siteaccess>
  */
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $nodeBuilder->arrayNode('languages')->cannotBeEmpty()->info('Available languages, in order of precedence')->example(array('fre-FR', 'eng-GB'))->prototype('scalar')->end()->end()->arrayNode('translation_siteaccesses')->info('List of "translation siteaccesses" which can be used by language switcher.')->example(array('french_siteaccess', 'english_siteaccess'))->prototype('scalar')->end()->end();
 }
 /**
  * Adds semantic configuration definition.
  *
  * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system.<siteaccess>
  */
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $nodeBuilder->arrayNode('ezpage')->children()->arrayNode('enabledLayouts')->prototype('scalar')->end()->info('List of enabled layout identifiers')->end()->arrayNode('enabledBlocks')->prototype('scalar')->end()->info('List of enabled block identifiers')->end()->arrayNode('layouts')->info('List of registered layouts, the key is the identifier of the layout')->useAttributeAsKey('key')->normalizeKeys(false)->prototype('array')->children()->scalarNode('name')->isRequired()->info('Name of the zone type')->end()->scalarNode('template')->isRequired()->info('Template to use to render this layout')->end()->end()->end()->end()->arrayNode('blocks')->info('List of available blocks, the key is the identifier of the block')->useAttributeAsKey('key')->normalizeKeys(false)->prototype('array')->children()->scalarNode('name')->isRequired()->info('Name of the block')->end()->end()->end()->end()->end()->end();
 }
示例#22
0
 private function addMetadataSection(NodeBuilder $builder)
 {
     $builder->arrayNode('metadata')->addDefaultsIfNotSet()->fixXmlConfig('directory', 'directories')->children()->scalarNode('cache')->defaultValue('file')->end()->booleanNode('debug')->defaultValue($this->debug)->end()->arrayNode('file_cache')->addDefaultsIfNotSet()->children()->scalarNode('dir')->defaultValue('%kernel.cache_dir%/jms_serializer')->end()->end()->end()->booleanNode('auto_detection')->defaultTrue()->end()->arrayNode('directories')->prototype('array')->children()->scalarNode('path')->isRequired()->end()->scalarNode('namespace_prefix')->defaultValue('')->end()->end()->end()->end()->end()->end();
 }
示例#23
0
 /**
  * Adds semantic configuration definition.
  *
  * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system.<siteaccess>
  */
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $nodeBuilder->arrayNode('content')->info('Content related configuration')->children()->booleanNode('view_cache')->defaultValue(true)->end()->booleanNode('ttl_cache')->defaultValue(true)->end()->scalarNode('default_ttl')->info('Default value for TTL cache, in seconds')->defaultValue(60)->end()->arrayNode('tree_root')->canBeUnset()->children()->integerNode('location_id')->info("Root locationId for routing and link generation.\nUseful for multisite apps with one repository.")->isRequired()->end()->arrayNode('excluded_uri_prefixes')->info("URI prefixes that are allowed to be outside the content tree\n(useful for content sharing between multiple sites).\nPrefixes are not case sensitive")->example(array('/media/images', '/products'))->prototype('scalar')->end()->end()->end()->end()->end()->end();
 }
示例#24
0
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $nodeBuilder->arrayNode('io')->info('Binary storage options')->children()->scalarNode('metadata_handler')->info('Handler uses to manipulate IO files metadata')->example('default')->end()->scalarNode('binarydata_handler')->info('Handler uses to manipulate IO files binarydata')->example('default')->end()->scalarNode('url_prefix')->info('Prefix added to binary files uris. A host can also be added')->example('$var_dir$/$storage_dir$, http://static.example.com/')->end()->end()->end();
 }
示例#25
0
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $nodeBuilder->arrayNode('io')->info('Binary storage options')->children()->scalarNode('metadata_handler')->info('Handler uses to manipulate IO files metadata')->example('default')->end()->scalarNode('binarydata_handler')->info('Handler uses to manipulate IO files binarydata')->example('default')->end()->scalarNode('url_prefix')->info('Prefix added to binary files uris. A host can also be added')->example('$var_dir$/$storage_dir$, http://static.example.com/')->end()->arrayNode('permissions')->info('Permissions applied by the Local flysystem adapter when creating content files and directories in storage.')->children()->scalarNode('files')->defaultValue('0644')->end()->scalarNode('directories')->defaultValue('0755')->end()->end()->end()->end()->end();
 }
示例#26
0
 /**
  * Adds the definitions.
  *
  * @param NodeBuilder $node The node builder.
  */
 public function addDefinitions(NodeBuilder $node)
 {
     $node->arrayNode('fixed')->info('The `FixedTimeProvider` settings.')->addDefaultsIfNotSet()->children()->scalarNode('sec')->info('The fixed number of seconds since the Unix Epoch.')->cannotBeEmpty()->end()->scalarNode('usec')->info('The fixed number of microseconds.')->cannotBeEmpty();
 }
 /**
  * Adds semantic configuration definition.
  *
  * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.<system>.<siteaccess>
  */
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $fieldTypeNodeBuilder = $nodeBuilder->arrayNode($this->getFieldTypeIdentifier())->children();
     $this->addFieldTypeSemanticConfig($fieldTypeNodeBuilder);
 }
示例#28
0
 /**
  * Adds the definitions.
  *
  * @param NodeBuilder $node The node builder.
  */
 public function addDefinitions(NodeBuilder $node)
 {
     $node->arrayNode('guid')->info('The `GuidStringCodec` settings.')->addDefaultsIfNotSet()->children()->scalarNode('uuid_builder')->info('The UUID builder service to use.')->cannotBeEmpty()->defaultValue('kherge_uuid.builder.default');
 }
示例#29
0
 /**
  * @param NodeBuilder $callbacks
  * @param string      $type
  */
 private function addSubCallbackSection(NodeBuilder $callbacks, $type)
 {
     $callbacks->arrayNode($type)->useAttributeAsKey('name')->prototype('array')->children()->scalarNode('on')->end()->variableNode('do')->end()->variableNode('from')->end()->variableNode('to')->end()->scalarNode('disabled')->defaultValue(false)->end()->end()->end()->end();
 }
示例#30
0
 /**
  * Adds semantic configuration definition.
  *
  * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system.<siteaccess>
  */
 public function addSemanticConfig(NodeBuilder $nodeBuilder)
 {
     $nodeBuilder->arrayNode(static::NODE_KEY)->info(static::INFO)->prototype('array')->children()->scalarNode('template')->info(static::INFO_TEMPLATE_KEY)->isRequired()->end()->scalarNode('priority')->defaultValue(0)->end()->end()->end()->end();
 }